diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2014-08-29 15:19:32 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2014-08-29 15:19:32 -0700 |
commit | 961945046848492ddc541700419cf553e7817c94 (patch) | |
tree | b9119602d1b03137c8408afbc1f9fa9614e67ba1 /activesupport/test | |
parent | cc0d8fbec96aeb1664fe98d45929a236b18aec81 (diff) | |
download | rails-961945046848492ddc541700419cf553e7817c94.tar.gz rails-961945046848492ddc541700419cf553e7817c94.tar.bz2 rails-961945046848492ddc541700419cf553e7817c94.zip |
Use instance_eval on @tenderlove's suggestion :trollface:
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/object/blank_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/test/core_ext/object/blank_test.rb b/activesupport/test/core_ext/object/blank_test.rb index 7b3f10b4da..34d10c6981 100644 --- a/activesupport/test/core_ext/object/blank_test.rb +++ b/activesupport/test/core_ext/object/blank_test.rb @@ -35,7 +35,7 @@ class BlankTest < ActiveSupport::TestCase end def test_presence_with_a_block - assert_equal "SALLY", "sally".presence(&:upcase) || "Nobody" - assert_equal "Nobody", nil.presence(&:upcase) || "Nobody" + assert_equal "SALLY", "sally".presence { upcase } || "Nobody" + assert_equal "Nobody", nil.presence { upcase } || "Nobody" end end |