Groups
Groups
Sign in
Groups
Groups
Got.rb
Conversations
About
Send feedback
Help
what ruby code is too clever?
1 view
Skip to first unread message
Faheem
unread,
Apr 16, 2009, 4:36:08 PM
4/16/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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 PM
4/16/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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