[Ruby] code review

Ryan Davis ryand-ruby at zenspider.com
Tue Oct 31 12:38:38 PST 2006


On Oct 31, 2006, at 12:38 PM, Ofer Matan wrote:

> Question:
> One reason I used defaults_options is so not to change the  
> parameters that
> are passed into the method - this is one
> of the hardest things for me to get used to in Ruby - everything is  
> passed
> by reference. If you are fiddling around with parameters what is  
> the right
> way to go about it?

All I was suggesting was to make it smaller and clearer:

     options = {:conditions => 'true'}.merge(options)



More information about the Ruby mailing list