The following code:
class Klass
end
p Klass.instance_methods(false)
Klass.module_eval do
def hello
puts 'hello’
end
end
p Klass.instance_methods(false)
Klass.module_eval(“def hello2() puts ‘hello2’; end”)
p Klass.instance_methods(false)
produces this output in 1.8.0pre3:
[]
[]
[“hello2”]
but in 1.6.8 it produces:
[]
[“hello”]
[“hello2”, “hello”]
Is this a bug in 1.8 or a feature?