cfabianski/activevalidators — comment on commit c1c13e11ce4626e47d6faec7c91b27fbe481d600
File: test/validations/email_test.rb line 78
By cesario:

ruby-1.9.3-p125 :001 > def foo(bar = {}, baz={})
ruby-1.9.3-p125 :002?> puts bar.inspect
ruby-1.9.3-p125 :003?> puts baz.inspect
ruby-1.9.3-p125 :004?> end
ruby-1.9.3-p125 :005 > foo({:a => :b}, {:c => :d})
{:a=>:b}
{:c=>:d}

2012/2/28 FABIANSKI Cdric <
reply@reply.github.com
>

> (BTW)
>
> Do you know a way to have a method declaration like this?
> How to make sure a hash is part of the first hash and not part of the
> second one?
>
> ```ruby
> def method_with_multiple_hash_instanciation(hash1 = {}, hash2 = {})
> p "hash 1 : #{hash1.inspect}"
> p "hash 2 : #{hash2.inspect}"
> end
> ```
>
> ```ruby
> >> method_with_multiple_hash_instanciation :hash1 => {:content1 =>
> "content"}, :hash2 => {:content2 => "content"}
> "hash 1 : {:hash1=>{:content1=>\"content\"},
> :hash2=>{:content2=>\"content\"}}"
> "hash 2 : {}"
> ```
>
> I think this is why, the password_test made it this way
>
> ---
> Reply to this email directly or view it on GitHub:
>
> https://github.com/cfabianski/activevalidators/commit/c1c13e11ce4626e47d6faec7c91b27fbe481d600#commitcomment-1019816
>

--
Franck Verrot
https://github.com/cesario
https://twitter.com/cesariogw