diff options
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_method.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/bootstraptest/test_method.rb b/bootstraptest/test_method.rb index 2baf33539d..d6b8c0ea24 100644 --- a/bootstraptest/test_method.rb +++ b/bootstraptest/test_method.rb @@ -1184,3 +1184,23 @@ assert_equal 'ok', %q{ 'ok' }, '[ruby-core:30534]' +# should not cache when splat +assert_equal 'ok', %q{ + class C + attr_reader :a + def initialize + @a = 1 + end + end + + def m *args + C.new.a(*args) + end + + m() + begin + m(1) + rescue ArgumentError + 'ok' + end +} |