On Nov 21, 2005, at 9:37 PM, Stefan Kaes wrote:

> I find it rather inelegant to be forced into writing
>
>   if x = options[:x]
>     f(x)
>   end
>
> or even
>
>  f(options[:x]) if options[:x]
>
> instead of
>
>  f(x) if x=options[:x]

f options[:x] if options.include? :x

> The Rails source code is literally messed up with the second  
> variant, which is potentially slower too.

I've found several parts of the Rails source code to be very un- 
Rubyish.  I would not necessarily equate a line of Rails code to a  
problem with Ruby itself.

-- 
Eric Hodel - drbrain / segment7.net - http://segment7.net
FEC2 57F1 D465 EB15 5D6E  7C11 332A 551C 796C 9F04