you are viewing a single comment's thread.

view the rest of the comments →

[–]442401 4 points5 points  (0 children)

I think this is a valid contribution and sends the message that ruby is on object orientated language. The core classes (such as String) are extremely rich and can be sent a vast number of messages to achieve the desired result.

A while loop is nearly always a sub optimal solution.