ruby/ruby — pull request #67 by pyr (2011-12-14 13:29:47+00:00)
Title: * Add Object#embed which works like tap but returns the block's value

This avoids breaking from method chains in many cases. I don't see any other way to do this without this method.

Can someone confirm pull request are a valid way of submitting patches ? I cannot register on the mailing list for some reason, it seems to be broken.

Example:

```ruby
[ 1, 2, 3, 4].select{|x| x.odd?}.embed{|x| {:total => x.count, :data => x}}
```