summaryrefslogtreecommitdiff
path: root/spec/ruby/core/unboundmethod/fixtures/classes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/unboundmethod/fixtures/classes.rb')
-rw-r--r--spec/ruby/core/unboundmethod/fixtures/classes.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/ruby/core/unboundmethod/fixtures/classes.rb b/spec/ruby/core/unboundmethod/fixtures/classes.rb
index 6ab958d447..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
@@ -63,6 +65,9 @@ module UnboundMethodSpecs
class Parent
def foo; end
+ def foo_super
+ true
+ end
def self.class_method
"I am #{name}"
end
@@ -76,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]