diff options
Diffstat (limited to 'activesupport/test/core_ext/object_and_class_ext_test.rb')
-rw-r--r-- | activesupport/test/core_ext/object_and_class_ext_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/object_and_class_ext_test.rb b/activesupport/test/core_ext/object_and_class_ext_test.rb index 22e4c6b8b4..fc19183ede 100644 --- a/activesupport/test/core_ext/object_and_class_ext_test.rb +++ b/activesupport/test/core_ext/object_and_class_ext_test.rb @@ -111,4 +111,10 @@ class ObjectInstanceVariableTest < Test::Unit::TestCase object.instance_variable_set :@b, 2 assert_equal({'a' => 1, 'b' => 2}, object.instance_values) end + + def test_instance_exec_passes_arguments_to_block + block = Proc.new { |value| [self, value] } + assert_equal %w(hello goodbye), 'hello'.instance_exec('goodbye', &block) + end + end |