4 ms·
A block is a proc. ```ruby def foo &bar return bar end foo {} # => #<Proc:0x00007ff23783c4e0@(irb):16> ``` But I do agree that I don't quite understan
by ravenstine 8y ago
A block is a proc.
```ruby
def foo &bar
return bar
end
foo {}
# => #<Proc:0x00007ff23783c4e0@(irb):16>
```
But I do agree that I don't quite understand the need for the distinction between procs and methods, or the need for unbound methods; I would think that methods could just be either bound to one object or another, as unbound methods are useless for the fact that they won't work at all unless they are bound.
- int_19h 8y agoI think they rather meant the difference between procs and lambdas (e.g. wrt return).