summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-04 23:08:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-04 23:08:32 +0000
commitf4691c87092590cc068d1df19b79a7e3b38826d2 (patch)
tree19f6fec4fd8e2a420fbf9a06e6d899bdb37a3382 /test
parent8d96bc5e2ddb03e4e9c83cb6aae4bf010f89b7d4 (diff)
downloadruby-f4691c87092590cc068d1df19b79a7e3b38826d2.tar.gz
ruby-f4691c87092590cc068d1df19b79a7e3b38826d2.tar.xz
ruby-f4691c87092590cc068d1df19b79a7e3b38826d2.zip
* vm_insnhelper.c (vm_yield_setup_block_args): restores the first
arg where is overwritten at funcall. [ruby-core:24139] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_proc.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb
index 8439f8cd6..e557f185f 100644
--- a/test/ruby/test_proc.rb
+++ b/test/ruby/test_proc.rb
@@ -747,4 +747,11 @@ class TestProc < Test::Unit::TestCase
assert_match(/^#{ Regexp.quote(__FILE__) }$/, file)
assert_equal(source_location_test - 1, lineno)
end
+
+ def test_splat_without_respond_to
+ def (obj = Object.new).respond_to?(m); false end
+ [obj].each do |a, b|
+ assert_equal([obj, nil], [a, b], '[ruby-core:24139]')
+ end
+ end
end