diff options
author | Benoit Daloze <[email protected]> | 2023-05-29 15:27:57 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2023-05-29 15:27:57 +0200 |
commit | c48d496e8cfdf8243d2beb28623954003adaf7fc (patch) | |
tree | 2d53327b3126360ccb42f9dae9889b7f329ad035 /spec/ruby/core/module/fixtures | |
parent | 98f500d0958d12b1909f4638abf33682d75f3fe6 (diff) |
Update to ruby/spec@c3677cf
Diffstat (limited to 'spec/ruby/core/module/fixtures')
-rw-r--r-- | spec/ruby/core/module/fixtures/classes.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/ruby/core/module/fixtures/classes.rb b/spec/ruby/core/module/fixtures/classes.rb index bc6b940a6c..a434e7b0b8 100644 --- a/spec/ruby/core/module/fixtures/classes.rb +++ b/spec/ruby/core/module/fixtures/classes.rb @@ -596,6 +596,32 @@ module ModuleSpecs private :foo end EmptyFooMethod = m.instance_method(:foo) + + # for undefined_instance_methods spec + module UndefinedInstanceMethods + module Super + def super_included_method; end + end + + class Parent + def undefed_method; end + undef_method :undefed_method + + def parent_method; end + def another_parent_method; end + end + + class Child < Parent + include Super + + undef_method :parent_method + undef_method :another_parent_method + end + + class Grandchild < Child + undef_method :super_included_method + end + end end class Object |