################
case.1
################
class X
def x
def xx; end
end
end
x = X.new
x.x
p x.singleton_methods.grep(/xx/) #=> []
################
case.2
################
class X
def x
instance_eval “def xx; end”
end
end
x = X.new
x.x
p x.singleton_methods.grep(/xx/) #=> [:xx]
###############################################################
Is not instance level when x method is called in case1 ??
What’s the difference between the two cases ???
###############################################################