what ruby code is too clever?

1 view
Skip to first unread message

Faheem

unread,
Apr 16, 2009, 4:36:08 PM4/16/09
to Got.rb
I remember we discussed something along the lines of this thing. Here
is a bit of related discussion on stackoverflow for you to check out.

http://stackoverflow.com/questions/708428/whats-an-example-of-ruby-code-thats-too-clever

I agree with one of the posters point about using
a.map { |e| e.downcase }
rather than
a.map(&:downcase)

Comments are appreciated. Discuss on =)

Faheem

unread,
Apr 16, 2009, 4:42:41 PM4/16/09
to Got.rb
and for the same example, I would prefer to use the 'every' gem
mentioned here:

http://mynyml.com/15-enumerableevery/



On Apr 16, 10:36 pm, Faheem <fah...@gmail.com> wrote:
> I remember we discussed something along the lines of this thing. Here
> is a bit of related discussion on stackoverflow for you to check out.
>
> http://stackoverflow.com/questions/708428/whats-an-example-of-ruby-co...
Reply all
Reply to author
Forward
0 new messages