Just tried to do some fancy (probably inappropriate)
things with include:
module Foo
def foo
puts "foo called"
end
end
class MyClass
class << self
def include(*args)
include *args
end
end
def try_include
self.class.include Foo
puts "included Foo"
self.foo
end
end
obj = MyClass.new
obj.try_include
When I feed ruby with this code, it fills all available memory
(including swap) and the only way to stop it is per KILL.
BTW: "included Foo" is never printed.