diff options
Diffstat (limited to 'spec/ruby/language/super_spec.rb')
-rw-r--r-- | spec/ruby/language/super_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/ruby/language/super_spec.rb b/spec/ruby/language/super_spec.rb index 936e3164b6..a86fb1df33 100644 --- a/spec/ruby/language/super_spec.rb +++ b/spec/ruby/language/super_spec.rb @@ -191,6 +191,20 @@ describe "The super keyword" do Super::RestArgsWithSuper::B.new.a.should == ["foo"] end + # https://bugs.ruby-lang.org/issues/14279 + it "passes along reassigned rest args" do + Super::ZSuperWithRestReassigned::B.new.a("bar").should == ["foo"] + end + + # Don't run this spec on Appveyor because it uses old Ruby versions + # The specs ends with segfault on old versions so let's just disable it + platform_is_not :windows do + # https://bugs.ruby-lang.org/issues/14279 + it "wraps into array and passes along reassigned rest args with non-array scalar value" do + Super::ZSuperWithRestReassignedWithScalar::B.new.a("bar").should == ["foo"] + end + end + it "invokes methods from a chain of anonymous modules" do Super::AnonymousModuleIncludedTwice.new.a([]).should == ["anon", "anon", "non-anon"] end |