diff options
author | Erik Michaels-Ober <sferik@gmail.com> | 2014-10-27 17:28:53 +0100 |
---|---|---|
committer | Erik Michaels-Ober <sferik@gmail.com> | 2014-11-29 11:53:24 +0100 |
commit | d1374f99bf3090f3e659687c112ed0c5c0865cfb (patch) | |
tree | e87455ea620155254511180cc1f08c5544ed195c /activesupport/test/core_ext/object | |
parent | 56e47cf66d2e3009b4032d0cd2ceb1a6e5e42573 (diff) | |
download | rails-d1374f99bf3090f3e659687c112ed0c5c0865cfb.tar.gz rails-d1374f99bf3090f3e659687c112ed0c5c0865cfb.tar.bz2 rails-d1374f99bf3090f3e659687c112ed0c5c0865cfb.zip |
Pass symbol as an argument instead of a block
Diffstat (limited to 'activesupport/test/core_ext/object')
-rw-r--r-- | activesupport/test/core_ext/object/try_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/test/core_ext/object/try_test.rb b/activesupport/test/core_ext/object/try_test.rb index efc6beaf02..89438675c1 100644 --- a/activesupport/test/core_ext/object/try_test.rb +++ b/activesupport/test/core_ext/object/try_test.rb @@ -52,11 +52,11 @@ class ObjectTryTest < ActiveSupport::TestCase end def test_try_only_block - assert_equal @string.reverse, @string.try { |s| s.reverse } + assert_equal @string.reverse, @string.try(&:reverse) end def test_try_only_block_bang - assert_equal @string.reverse, @string.try! { |s| s.reverse } + assert_equal @string.reverse, @string.try!(&:reverse) end def test_try_only_block_nil |