3 ms·
You're right, captured blocks are instances of Proc. However I still claim that methods are objects that can be passed around, assigned to variables, and sent
by sjs 17y ago
You're right, captured blocks are instances of Proc. However I still claim that methods are objects that can be passed around, assigned to variables, and sent messages. Method and UnboundMethod are both classes that inherit from Object. It's right there in proc.c with the Proc class.
Method.ancestors #=> [Method, Object, Kernel]
- tesseract 17y agoI don't disagree with you there.