Back to photostream

ruby_187_index_takes_block

Ruby 1.8.7 now has Array#index taking a block.

 

A while ago I posted a monkeypatch to Ruby 1.8.6 that changed Array#index to take a block, making it work the same as other, similar Array methods. I posted it and asked if it was good or evil on my LJ at chalain.livejournal.com/72513.html and the responses strongly tended towards "no, it should not do this!"

 

Well, I was right and they were wrong. Neener neener!

307 views
0 faves
0 comments
Uploaded on July 12, 2008
Taken on July 12, 2008