mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@07164da
This commit is contained in:
parent
7429841ab6
commit
126fd5f15c
38 changed files with 733 additions and 44 deletions
|
@ -3,6 +3,10 @@ module ModuleSpecs
|
|||
def foo; "foo" end
|
||||
end
|
||||
|
||||
class ClassWithSuperFoo
|
||||
def foo; [:C] end
|
||||
end
|
||||
|
||||
module PrependedModule
|
||||
def foo; "foo from prepended module"; end
|
||||
end
|
||||
|
@ -11,7 +15,11 @@ module ModuleSpecs
|
|||
def foo; "foo from included module"; end
|
||||
end
|
||||
|
||||
def self.build_refined_class
|
||||
Class.new(ClassWithFoo)
|
||||
def self.build_refined_class(for_super: false)
|
||||
if for_super
|
||||
Class.new(ClassWithSuperFoo)
|
||||
else
|
||||
Class.new(ClassWithFoo)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue