From 918fefb7f71487770b538336fca0dca8d442d32e Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 4 Jul 2009 23:08:32 +0000 Subject: * vm_insnhelper.c (vm_yield_setup_block_args): restores the first arg where is overwritten at funcall. [ruby-core:24139] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_proc.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/ruby/test_proc.rb') diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb index 8439f8cd6b..e557f185f2 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 -- cgit v1.2.3