Difference between Kernel#__callee__ and Kernel#__method__

Is there any Difference between Kernel#callee
(http://yard.ruby-doc.org/core-2.0/Kernel.html#__callee__-instance_method)
and Kernel#method
(http://yard.ruby-doc.org/core-2.0/Kernel.html#__method__-instance_method)
?

method returns defined name, and callee returns called name.
They are same usually, but different in a aliased method.

def foo
[method, callee]
end
alias bar foo
p foo #=> [:foo, :foo]
p bar #=> [:foo, :bar]

Nobuyoshi N. wrote in post #1114391:

method returns defined name, and callee returns called name.
They are same usually, but different in a aliased method.

def foo
[method, callee]
end
alias bar foo
p foo #=> [:foo, :foo]
p bar #=> [:foo, :bar]

Excellent answer !! :slight_smile:

Thank you very much @Nobuyoshi