K
Kyung won Cheon
-- test1.rb --
class C
def a
end
end
class C
def a
puts "override"
end
end
puts C.new.a # => override
-- test2.rb --
class C
def a
end
end
module M
class C
def a
puts "why not override?"
end
end
end
include M
puts C.new.a # => nil
########################
# Help Me^^
########################
class C
def a
end
end
class C
def a
puts "override"
end
end
puts C.new.a # => override
-- test2.rb --
class C
def a
end
end
module M
class C
def a
puts "why not override?"
end
end
end
include M
puts C.new.a # => nil
########################
# Help Me^^
########################