This project is archived and is in readonly mode.
Use of #tap before requiring Active Support breaks on Ruby 1.8.6
Reported by Chris Kampmeier | May 4th, 2009 @ 02:12 AM | in 2.x
Commit 945bf9c2 breaks Active Record on versions of Ruby that
don't have a native #tap
(like 1.8.6), because it
tries to use #tap
about two lines before Active
Support is available :)
When I try to run the AR tests on OS X's 1.8.6p114, I get this:
/Users/chrisk/Documents/railstest/rails/activerecord/test/cases/../../lib/active_record.rb:24: undefined method `tap' for #<String:0x11ca1a0> (NoMethodError)
A simple fix is to go back to the previous way of handling the string, just using a local variable. This fixes the test suite for me. I've attached a patch.
Comments and changes to this ticket
-
Anthony Crumley May 4th, 2009 @ 06:21 AM
Here is a slightly different solution that eliminates the global variable but results in creating an extra array.
-
Repository May 4th, 2009 @ 04:36 PM
- State changed from new to committed
(from [d3ee8756c8b09b8524a9599926b02ededd27319c]) Don't use #tap before Active Support is available, since older versions of ruby don't have native implementations
[#2603 state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 2603 Use of #tap before requiring Active Support breaks on Ruby 1.8.6 [#2603 state:committed]