diff options
Diffstat (limited to 'test/ruby/test_proc.rb')
-rw-r--r-- | test/ruby/test_proc.rb | 7 |
1 files changed, 7 insertions, 0 deletions
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 |