aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2017-11-14 17:15:33 +0900
committerAkira Matsuda <ronnie@dio.jp>2017-11-15 17:21:05 +0900
commit23c41e4657a507c574e555339821f545c819e602 (patch)
treef066b969ec3703b029838baba7100319b844738f
parent6c27341fbce0e2eb12550ef4aff2bd7ef5d9dda0 (diff)
downloadrails-23c41e4657a507c574e555339821f545c819e602.tar.gz
rails-23c41e4657a507c574e555339821f545c819e602.tar.bz2
rails-23c41e4657a507c574e555339821f545c819e602.zip
These strings should already be frozen where ruby accepts the magic-comment
-rw-r--r--activesupport/test/core_ext/object/instance_variables_test.rb4
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