From: Brian Candler Date: 2009-11-21T23:00:35+09:00 Subject: Re: confuse about initialize hash Zhenning Guan wrote: > all I confusing is the process. the hash parameter is used a lot in the > rails code. It is a special case: when the last argument to a method call is a hash, then you can omit the outer braces. >> def example(*args); p args; end => nil >> example(123, 456, {"foo"=>9, "bar"=>11}) [123, 456, {"foo"=>9, "bar"=>11}] => nil >> example(123, 456, "foo"=>9, "bar"=>11) [123, 456, {"foo"=>9, "bar"=>11}] => nil >> -- Posted via http://www.ruby-forum.com/.