diff options
Diffstat (limited to 'spec/ruby/core/unboundmethod/fixtures/classes.rb')
| -rw-r--r-- | spec/ruby/core/unboundmethod/fixtures/classes.rb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/spec/ruby/core/unboundmethod/fixtures/classes.rb b/spec/ruby/core/unboundmethod/fixtures/classes.rb index 46b1c51669..58120c2f88 100644 --- a/spec/ruby/core/unboundmethod/fixtures/classes.rb +++ b/spec/ruby/core/unboundmethod/fixtures/classes.rb @@ -22,6 +22,7 @@ module UnboundMethodSpecs module Mod def from_mod; end + def foo_super; super; end end class Methods @@ -35,6 +36,7 @@ module UnboundMethodSpecs alias bar foo alias baz bar + alias qux baz alias alias_1 foo alias alias_2 foo @@ -53,10 +55,19 @@ module UnboundMethodSpecs def discard_1(); :discard; end def discard_2(); :discard; end + + def my_public_method; end + def my_protected_method; end + def my_private_method; end + protected :my_protected_method + private :my_private_method end class Parent def foo; end + def foo_super + true + end def self.class_method "I am #{name}" end @@ -70,6 +81,22 @@ module UnboundMethodSpecs end end + module Mixin + def mixin_method; end + end + + class IncluderBase + include Mixin + end + + class IncluderChild < IncluderBase; end + + class ExtenderBase + extend Mixin + end + + class ExtenderChild < ExtenderBase; end + class A def baz(a, b) return [__FILE__, self.class] @@ -84,4 +111,14 @@ module UnboundMethodSpecs class C < B def overridden; end end + + module HashSpecs + class SuperClass + def foo + end + end + + class SubClass < SuperClass + end + end end |
