From: Randall Potter Date: 2012-03-15T13:11:12+09:00 Subject: [ruby-core:43292] [ruby-trunk - Bug #6149] Object#tap does not return the object it is called on in some cases Issue #6149 has been updated by Randall Potter. I see that now. I'm going to close this. ---------------------------------------- Bug #6149: Object#tap does not return the object it is called on in some cases https://bugs.ruby-lang.org/issues/6149#change-24592 Author: Randall Potter Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: ruby 1.9.3p125 (2012-02-16 revision 34643) [i686-linux] # gem install httparty # then in an irb console enter : require 'httparty' class Foo include HTTParty base_uri 'http://example.com' end Foo.get('/').class # => HTTParty::Response Foo.get('/').tap {|x| }.class # => String # should be HTTParty::Response # for completeness $ gem env RubyGems Environment: - RUBYGEMS VERSION: 1.8.11 - RUBY VERSION: 1.9.3 (2012-02-16 patchlevel 125) [i686-linux] - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9.1 - RUBY EXECUTABLE: /usr/local/bin/ruby - EXECUTABLE DIRECTORY: /usr/local/bin - RUBYGEMS PLATFORMS: - ruby - x86-linux - GEM PATHS: - /usr/local/lib/ruby/gems/1.9.1 - /home/rjspotter/.gem/ruby/1.9.1 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://rubygems.org/ $ gem list *** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.2.1, 3.1.3, 3.1.1, 3.0.10, 3.0.3, 3.0.2) actionpack (3.2.1, 3.2.0.rc2, 3.1.3, 3.1.1, 3.0.10, 3.0.3, 3.0.2) active_support (3.0.0) active_utils (1.0.3, 1.0.2, 1.0.1) activemerchant (1.21.0, 1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20.0, 1.18.1) activemodel (3.2.2, 3.2.1, 3.2.0.rc2, 3.1.3, 3.1.1, 3.0.10, 3.0.3, 3.0.2) activerecord (3.2.2, 3.2.1, 3.1.3, 3.1.1, 3.0.10, 3.0.3, 3.0.2) activeresource (3.2.1, 3.1.3, 3.1.1, 3.0.10, 3.0.3, 3.0.2) activesupport (3.2.2, 3.2.1, 3.2.0, 3.2.0.rc2, 3.1.3, 3.1.1, 3.0.10, 3.0.3, 3.0.2, 3.0.0, 2.3.14) addressable (2.2.7, 2.2.6, 2.2.2) amazon-ecs (2.2.4, 2.2.3) archive-tar-minitar (0.5.2) arel (3.0.2, 3.0.0, 2.2.1, 2.0.10, 2.0.4) arrayfields (4.7.4) Ascii85 (1.0.1) asset_sync (0.2.9) aws-s3 (0.6.2) aws-sdk (1.3.5, 1.3.4, 1.3.3, 1.3.2, 1.2.5, 1.2.4, 1.2.3, 1.0.3) bigdecimal (1.1.0) braintree (2.14.0, 2.13.4, 2.13.3, 2.13.2, 2.13.1, 2.13.0, 2.12.0, 2.11.0, 2.10.2) bson (1.5.2) bson_ext (1.5.2) builder (3.0.0, 2.1.2) bundler (1.0.21, 1.0.15) cancan (1.6.7, 1.6.5) capistrano (2.9.0) capybara (1.1.2, 0.4.0) capybara-webkit (0.9.0, 0.8.0, 0.7.2) celerity (0.9.2, 0.9.1, 0.8.5) childprocess (0.3.1, 0.3.0, 0.2.5, 0.2.4, 0.2.3, 0.2.2) chronic (0.6.7, 0.6.6, 0.3.0) churn (0.0.15, 0.0.13) cocaine (0.2.1) coffee-rails (3.2.2, 3.1.1) coffee-script (2.2.0) coffee-script-source (1.2.0, 1.1.3) colored (1.2) columnize (0.3.6, 0.3.5, 0.3.2) configuration (1.3.1, 1.2.0) crack (0.3.1, 0.1.8) culerity (0.2.15, 0.2.12) daemon_controller (1.0.0, 0.2.6) daemons (1.1.8, 1.1.7, 1.1.6, 1.1.5, 1.1.4, 1.1.0) dalli (1.1.5, 1.1.4) database_cleaner (0.7.1, 0.7.0, 0.6.0) delayed_job (3.0.1, 3.0.0, 2.1.4, 2.1.1) delayed_job_active_record (0.3.2) diff-lcs (1.1.3, 1.1.2) dr_nic_magic_models (0.9.2) erubis (2.7.0, 2.6.6) eventmachine (0.12.10) excon (0.9.6, 0.9.5) execjs (1.3.0, 1.2.13, 1.2.12, 1.2.11, 1.2.9) exifr (1.1.1, 1.0.3) facebooker2 (0.0.16, 0.0.14, 0.0.13, 0.0.12, 0.0.11) factory_girl (2.6.1, 2.6.0, 2.5.2, 2.5.1, 2.5.0, 2.4.2, 2.3.2, 2.3.1, 2.2.0, 2.1.0, 2.0.2) faker (1.0.1, 0.3.1) faraday (0.7.6, 0.7.5, 0.7.4, 0.5.3) faraday-stack (0.1.5, 0.1.4, 0.1.3) fastercsv (1.5.4) fattr (2.2.1, 2.2.0) ffi (1.0.11, 1.0.9) flay (1.4.3) flog (2.5.3) fog (1.1.2, 0.7.1) foreman (0.38.0, 0.36.1, 0.27.0, 0.19.0) formatador (0.2.1) fuubar (1.0.0, 0.0.6) git (1.2.5) guard (1.0.1, 1.0.0, 0.10.0, 0.8.8) guard-bundler (0.1.3) guard-rspec (0.6.0, 0.5.9, 0.5.8) haml (3.1.4, 3.1.3, 3.0.25, 3.0.24) hashie (1.2.0, 1.1.0, 1.0.0) headless (0.2.2) heckle (1.4.3) heroku (2.19.2, 2.19.0, 2.18.1, 2.16.1, 2.15.1, 2.4.0) highline (1.6.11, 1.6.9, 1.6.8, 1.6.5) hike (1.2.1) hirb (0.6.0, 0.5.0) hoe (2.14.0, 2.13.1, 2.13.0, 2.12.5) hominid (3.0.4, 3.0.2, 2.0.4) hoptoad_notifier (2.4.11) hpricot (0.8.6, 0.8.5, 0.8.4) htmlentities (4.3.1) httmultiparty (0.3.6) http_router (0.10.2) httparty (0.8.1, 0.8.0, 0.7.8, 0.4.5) i18n (0.6.0, 0.5.0, 0.4.2) ick (0.3.0) imagesize (0.1.1) indextank (1.0.12) io-console (0.3) iptc (0.0.3, 0.0.2) jasmine (1.1.2) jasmine-core (1.1.0) jeweler (1.8.3, 1.6.4) journey (1.0.3, 1.0.1, 1.0.0.rc4) jquery-rails (2.0.1, 2.0.0, 1.0.19, 0.2.6) jrails (0.6.0) json (1.6.5, 1.6.4, 1.6.3, 1.6.2, 1.6.1, 1.5.4, 1.4.6, 1.4.0) json_pure (1.6.5, 1.6.4, 1.6.3) jsonschema (2.0.2, 2.0.1) kgio (2.7.2) launchy (2.0.5, 0.3.7) libnotify (0.7.2, 0.7.0, 0.6.0, 0.5.9) libv8 (3.3.10.4 x86-linux) linecache19 (0.5.12) macaddr (1.5.0) magic_model_generator (0.4.2) mail (2.4.3, 2.4.1, 2.4.0, 2.3.0, 2.2.19, 2.2.10) main (4.8.1, 4.8.0, 4.7.1) map (5.2.0, 5.1.0, 4.7.1, 4.3.0) memcache-client (1.8.5) messiah (0.9.0) metric_fu (2.1.1) mime-types (1.17.2, 1.16) minitest (2.11.1, 2.11.0, 2.10.1, 2.9.0, 2.8.1, 2.5.1, 1.6.0) mogli (0.0.37, 0.0.36, 0.0.33, 0.0.29) money (4.0.2, 4.0.1, 3.7.1) mongo (1.5.2) mongoid (2.4.3, 2.4.2) multi_json (1.1.0, 1.0.4, 1.0.3) multi_xml (0.4.1, 0.4.0) multipart-post (1.1.5, 1.1.4, 1.1.3, 1.0.1) mysql (2.8.1) mysql2 (0.3.11, 0.3.7, 0.2.13, 0.2.6) nestful (0.0.8) net-scp (1.0.4) net-sftp (2.0.5) net-ssh (2.3.0, 2.2.1, 2.0.24, 2.0.23) net-ssh-gateway (1.1.0) newgem (1.5.3) nokogiri (1.5.1, 1.5.0, 1.4.4) oauth (0.4.5, 0.3.6) oauth2 (0.5.2) omniauth (1.0.2, 1.0.1) omniauth-facebook (1.2.0, 1.1.0) omniauth-oauth2 (1.0.0) padrino (0.10.6.e, 0.10.6.c) padrino-admin (0.10.6.e, 0.10.6.c) padrino-cache (0.10.6.e, 0.10.6.c) padrino-core (0.10.6.e, 0.10.6.c) padrino-gen (0.10.6.e, 0.10.6.c) padrino-helpers (0.10.6.e, 0.10.6.c) padrino-mailer (0.10.6.e, 0.10.6.c) paperclip (2.7.0, 2.5.2) ParseTree (3.0.8) paypal_adaptive (0.2.9, 0.2.8, 0.2.7, 0.2.6, 0.2.2, 0.2.0) pdf-reader (1.0.0, 0.10.1, 0.10.0, 0.9.2) polyglot (0.3.3, 0.3.2, 0.3.1) postmark (0.9.10, 0.9.8, 0.9.6) postmark-rails (0.4.1) prawn (0.12.0, 0.11.1) prawnto_2 (0.2.4, 0.2.2) progressbar (0.10.0, 0.9.2, 0.9.1) prototype-rails (3.2.1) rack (1.4.1, 1.4.0, 1.3.6, 1.3.5, 1.2.5, 1.2.4, 1.2.3, 1.2.1) rack-cache (1.2, 1.1) rack-jsonp-middleware (0.0.5) rack-mount (0.8.3, 0.6.14, 0.6.13) rack-protection (1.2.0) rack-ssl (1.3.2) rack-test (0.6.1, 0.5.7, 0.5.6) rails (3.2.1, 3.1.3, 3.1.1, 3.0.10, 3.0.3, 3.0.2) rails-erd (0.4.5) rails_best_practices (1.7.2, 1.6.0, 1.5.3, 1.2.0) railties (3.2.1, 3.1.3, 3.1.1, 3.0.10, 3.0.3, 3.0.2) raindrops (0.8.0) rake (0.9.2.2, 0.8.7) rb-fchange (0.0.5) rb-fsevent (0.9.0, 0.4.3.1) rb-inotify (0.8.8) rcov (0.9.11) rdoc (3.12, 3.11, 3.9.4, 2.5.8) recaptcha (0.3.4) RedCloth (4.2.9) redis (2.2.2) reek (1.2.8) rest-client (1.6.7, 1.6.3) rmagick (2.13.1) roodi (2.1.0) rspec (2.8.0, 2.7.0, 2.6.0, 2.3.0) rspec-core (2.8.0, 2.7.1, 2.6.4, 2.3.1) rspec-expectations (2.8.0, 2.7.0, 2.6.0, 2.3.0) rspec-instafail (0.2.2, 0.2.1, 0.1.9) rspec-mocks (2.8.0, 2.7.0, 2.6.0, 2.3.0) rspec-rails (2.8.1, 2.7.0) rubigen (1.5.7) ruby-aaws (0.7.0) ruby-filemagic (0.4.2) ruby-graphviz (1.0.5, 1.0.3, 1.0.2, 1.0.0, 0.9.21) ruby-hmac (0.4.0) ruby-progressbar (0.0.10) ruby-rc4 (0.1.5, 0.1.4, 0.1.3) ruby2ruby (1.3.1) ruby_core_source (0.1.5, 0.1.4) ruby_parser (2.3.1, 2.0.6) RubyInline (3.11.1, 3.11.0) rubyzip (0.9.6.1, 0.9.5, 0.9.4) Saikuro (1.1.0) sass (3.1.14, 3.1.12, 3.1.11) sass-rails (3.2.4, 3.1.5) sears-api (0.3.0, 0.2.0, 0.1.0) selenium-webdriver (2.20.0, 2.19.0, 2.18.0, 2.17.0, 2.16.0, 2.15.0, 2.14.0, 2.10.0, 2.8.0, 0.1.1) sexp_processor (3.1.0, 3.0.10, 3.0.9, 3.0.8, 3.0.7) shoulda (2.11.3) simplecov (0.6.1, 0.5.4) simplecov-html (0.5.3) sinatra (1.3.2) sinatra-flash (0.3.0) sprockets (2.3.0, 2.1.2, 2.0.3) syntax (1.0.0) syslogger (1.2.6, 1.2.5) systemu (2.4.2) term-ansicolor (1.0.7, 1.0.6) therubyracer (0.9.10, 0.9.9) thin (1.3.1, 1.2.11) thor (0.14.6) tilt (1.3.3) treetop (1.4.10, 1.4.9) ttfunk (1.0.3, 1.0.2, 1.0.1) twitter_oauth (0.4.3, 0.3.3) tzinfo (0.3.32, 0.3.31, 0.3.30, 0.3.29, 0.3.23) uglifier (1.2.3, 1.2.2, 1.2.1, 1.1.0) unicorn (4.2.0) url_mount (0.2.1) uuid (2.3.5, 2.3.4) uuidtools (2.1.2) watchr (0.7) webrat (0.7.3) will_paginate (3.0.3, 3.0.2, 3.0.pre2) workflow (0.8.1) xml-simple (1.1.1) xpath (0.1.4, 0.1.2) yajl-ruby (1.1.0, 1.0.0, 0.8.2) yard (0.7.5, 0.7.4, 0.6.8) ZenTest (4.6.2, 4.6.0) -- http://bugs.ruby-lang.org/