mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
These strings should already be frozen where ruby accepts the magic-comment
This commit is contained in:
parent
6c27341fbc
commit
23c41e4657
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue