diff options
author | Akira Matsuda <ronnie@dio.jp> | 2017-11-14 17:15:33 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2017-11-15 17:21:05 +0900 |
commit | 23c41e4657a507c574e555339821f545c819e602 (patch) | |
tree | f066b969ec3703b029838baba7100319b844738f /activesupport/test | |
parent | 6c27341fbce0e2eb12550ef4aff2bd7ef5d9dda0 (diff) | |
download | rails-23c41e4657a507c574e555339821f545c819e602.tar.gz rails-23c41e4657a507c574e555339821f545c819e602.tar.bz2 rails-23c41e4657a507c574e555339821f545c819e602.zip |
These strings should already be frozen where ruby accepts the magic-comment
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/object/instance_variables_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/test/core_ext/object/instance_variables_test.rb b/activesupport/test/core_ext/object/instance_variables_test.rb index b9ec827954..a3d8daab5b 100644 --- a/activesupport/test/core_ext/object/instance_variables_test.rb +++ b/activesupport/test/core_ext/object/instance_variables_test.rb @@ -19,7 +19,7 @@ class ObjectInstanceVariableTest < ActiveSupport::TestCase end def test_instance_exec_passes_arguments_to_block - assert_equal %w(hello goodbye), "hello".instance_exec("goodbye") { |v| [self, v] } + assert_equal %w(hello goodbye), "hello".dup.instance_exec("goodbye") { |v| [self, v] } end def test_instance_exec_with_frozen_obj @@ -27,7 +27,7 @@ class ObjectInstanceVariableTest < ActiveSupport::TestCase end def test_instance_exec_nested - assert_equal %w(goodbye olleh bar), "hello".instance_exec("goodbye") { |arg| + assert_equal %w(goodbye olleh bar), "hello".dup.instance_exec("goodbye") { |arg| [arg] + instance_exec("bar") { |v| [reverse, v] } } end end |