Hello,
In ruby ​​there is a special method method_missing, in case of an attempt to call a method that does not exist.Those.in such a situation
class SampleClass
  attr_accessor: something
  def initialize(something)
    @ something=something
  end
  def method_missing(m, * args,&block)
    p"#{m} doesn't exist"
  end
end

e=SampleClass.new("wazzup !!")
p e.something #will wazzup !!
p e.foo #will throw a NoMethodError exception and will call the method_missing method, will output foo doesn't exist
e.method("foo").call #error undefined method'foo'.method_missing does not work

Why does method_missing not work in the last line?
Version ruby ​​1.9.3
Thank.

1 Answers 1

try e.send(: foo)
method is a Kernel class method
it seems that in this case method_missing does not participate in the call stack.