Inspired by this discussion, after some googling I wasn't able to find an answer to a pretty simple question regarding methods in Ruby: are methods objects or not?
There are different opinions here and there, and I would really like to hear, let's say, an in-depth explanation.
I'm aware of Object#method
method, which takes a method name and returns a Method
instance, but, on the other hand, there's a similar thing you can do with blocks to make them into Proc
instances, and blocks aren't objects, so what makes methods any different?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…