summaryrefslogtreecommitdiff
path: root/spec/ruby/core/method
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2022-09-28 18:54:05 +0200
committerBenoit Daloze <eregontp@gmail.com>2022-09-29 15:48:35 +0200
commit94cea3e4d0a60326bd95be762819eed8ccd59ca6 (patch)
tree3f1ce9e04741e68ab53728e8ced70fa05e759d40 /spec/ruby/core/method
parent892f350a7db4d2cc99c5061d2e74498dfc4809ca (diff)
Fix {Method,UnboundMethod}#super_method for zsuper methods
* We need to resolve the zsuper method first, and then look the super method of that.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6467
Diffstat (limited to 'spec/ruby/core/method')
-rw-r--r--spec/ruby/core/method/super_method_spec.rb15
1 files changed, 3 insertions, 12 deletions
diff --git a/spec/ruby/core/method/super_method_spec.rb b/spec/ruby/core/method/super_method_spec.rb
index dc8764f6c7..c63a7aaa0f 100644
--- a/spec/ruby/core/method/super_method_spec.rb
+++ b/spec/ruby/core/method/super_method_spec.rb
@@ -49,18 +49,9 @@ describe "Method#super_method" do
MethodSpecs::InheritedMethods::C.new.derp.should == 'BA'
end
- ruby_version_is ""..."3.2" do
- it "returns the expected super_method" do
- method = MethodSpecs::InheritedMethods::C.new.method(:derp)
- method.super_method.owner.should == MethodSpecs::InheritedMethods::A
- end
- end
-
- ruby_version_is "3.2" do
- it "returns the expected super_method" do
- method = MethodSpecs::InheritedMethods::C.new.method(:derp)
- method.super_method.owner.should == MethodSpecs::InheritedMethods::B
- end
+ it "returns the expected super_method" do
+ method = MethodSpecs::InheritedMethods::C.new.method(:derp)
+ method.super_method.owner.should == MethodSpecs::InheritedMethods::A
end
end