diff options
Diffstat (limited to 'spec/ruby/core/unboundmethod')
-rw-r--r-- | spec/ruby/core/unboundmethod/super_method_spec.rb | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/spec/ruby/core/unboundmethod/super_method_spec.rb b/spec/ruby/core/unboundmethod/super_method_spec.rb index 5cf96e6fa9..aa7c129377 100644 --- a/spec/ruby/core/unboundmethod/super_method_spec.rb +++ b/spec/ruby/core/unboundmethod/super_method_spec.rb @@ -29,18 +29,14 @@ describe "UnboundMethod#super_method" do # https://github.com/jruby/jruby/issues/7240 context "after changing an inherited methods visibility" do - ruby_version_is ""..."3.2" do - it "returns the expected super_method" do - method = MethodSpecs::InheritedMethods::C.instance_method(:derp) - method.super_method.owner.should == MethodSpecs::InheritedMethods::A - end + it "calls the proper super method" do + method = MethodSpecs::InheritedMethods::C.instance_method(:derp) + method.bind(MethodSpecs::InheritedMethods::C.new).call.should == 'BA' end - ruby_version_is "3.2" do - it "returns the expected super_method" do - method = MethodSpecs::InheritedMethods::C.instance_method(:derp) - method.super_method.owner.should == MethodSpecs::InheritedMethods::B - end + it "returns the expected super_method" do + method = MethodSpecs::InheritedMethods::C.instance_method(:derp) + method.super_method.owner.should == MethodSpecs::InheritedMethods::A end end |