diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-08-31 13:15:26 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-08-31 13:20:15 -0700 |
commit | a1eb4e11c2cccb91483fa15f1a1a0b2ae518d2cf (patch) | |
tree | ef09df0f7118b04e8964753b83499ccf027bba1a /activesupport/lib/active_support/testing | |
parent | e9a8e0053be3b293ab89fb584f1d660063f107aa (diff) | |
download | rails-a1eb4e11c2cccb91483fa15f1a1a0b2ae518d2cf.tar.gz rails-a1eb4e11c2cccb91483fa15f1a1a0b2ae518d2cf.tar.bz2 rails-a1eb4e11c2cccb91483fa15f1a1a0b2ae518d2cf.zip |
Get rid of 'Object#send!'. It was originally added because it's in Ruby 1.9, but it has since been removed from 1.9.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Conflicts:
actionpack/test/controller/layout_test.rb
Diffstat (limited to 'activesupport/lib/active_support/testing')
-rw-r--r-- | activesupport/lib/active_support/testing/core_ext/test/unit/assertions.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/testing/core_ext/test/unit/assertions.rb b/activesupport/lib/active_support/testing/core_ext/test/unit/assertions.rb index 70a44eab8c..63d1ba6507 100644 --- a/activesupport/lib/active_support/testing/core_ext/test/unit/assertions.rb +++ b/activesupport/lib/active_support/testing/core_ext/test/unit/assertions.rb @@ -36,7 +36,11 @@ module Test # post :delete, :id => ... # end def assert_difference(expressions, difference = 1, message = nil, &block) - expression_evaluations = Array(expressions).collect{ |expression| lambda { eval(expression, block.send!(:binding)) } } + expression_evaluations = Array(expressions).map do |expression| + lambda do + eval(expression, block.__send__(:binding)) + end + end original_values = expression_evaluations.inject([]) { |memo, expression| memo << expression.call } yield |