diff options
Diffstat (limited to 'test/ruby/test_super.rb')
-rw-r--r-- | test/ruby/test_super.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ruby/test_super.rb b/test/ruby/test_super.rb index 9691116fb4..cf7580ab00 100644 --- a/test/ruby/test_super.rb +++ b/test/ruby/test_super.rb @@ -544,4 +544,20 @@ class TestSuper < Test::Unit::TestCase c.new } end + + class TestFor_super_with_modified_rest_parameter_base + def foo *args + args + end + end + + class TestFor_super_with_modified_rest_parameter < TestFor_super_with_modified_rest_parameter_base + def foo *args + args = 13 + super + end + end + def test_super_with_modified_rest_parameter + assert_equal [13], TestFor_super_with_modified_rest_parameter.new.foo + end end |