summaryrefslogtreecommitdiff
path: root/spec/ruby/core/method/owner_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/method/owner_spec.rb')
-rw-r--r--spec/ruby/core/method/owner_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/ruby/core/method/owner_spec.rb b/spec/ruby/core/method/owner_spec.rb
index ca5dff7295..05422f1697 100644
--- a/spec/ruby/core/method/owner_spec.rb
+++ b/spec/ruby/core/method/owner_spec.rb
@@ -23,4 +23,10 @@ describe "Method#owner" do
@m.method(:handled_via_method_missing).owner.should == MethodSpecs::Methods
end
end
+
+ ruby_version_is "3.2" do
+ it "returns the class on which public was called for a private method in ancestor" do
+ MethodSpecs::InheritedMethods::C.new.method(:derp).owner.should == MethodSpecs::InheritedMethods::C
+ end
+ end
end