On Tuesday, December 11, 2012 6:55:32 AM UTC-5, Robert Klemme wrote:
>
>
> > Oh, and nice use of polymorphism using #[] for both proc and hash 
> retrieval! 
>
> Thank you! :-) 
>

Well, everything went well except for one thing, which was a bit irritating 
actually -- I couldn't find a way to concisely handle a block with either 
one argument (just the key) or two arguments (the key and the value). Seems 
like that should be doable in one block call using a splat. But I had to 
have a condition on arity and two separate each_pair calls, one for each 
case. Maybe it's just not possible.

In any case, thanks for your help! The code is looking much better.

-- You received this message because you are subscribed to the Google Groups 
ruby-talk-google group. To post to this group, send email to 
[email protected]. To unsubscribe from this group, send email 
to [email protected]. For more options, visit this 
group at https://groups.google.com/d/forum/ruby-talk-google?hl=en

Reply via email to