From: 7stud -- Date: 2007-11-02T18:06:25+09:00 Subject: Re: What the hell is the => operator? Just Another Victim of the Morality wrote: > Can someone explain to me what is going on here? > Thank you... def methA(arg) p arg end methA({'a'=>10}) methA('a'=>10) methA 'a'=>10 --output:--- {"a"=>10} {"a"=>10} {"a"=>10} def methB(arg) p arg end methB({'a'=>10, 'b'=>20}) methB('a'=>10, 'b'=>20) methB 'a'=>10, 'b'=>20 --output:-- {"a"=>10, "b"=>20} {"a"=>10, "b"=>20} {"a"=>10, "b"=>20} def methC(arg1, arg2) p arg1, arg2 end methC(12.3, {'a'=>10, 'b'=>20}) methC(12.3, 'a'=>10, 'b'=>20) methC 12.3, 'a'=>10, 'b'=>20 --output:--- 12.3 {"a"=>10, "b"=>20} 12.3 {"a"=>10, "b"=>20} 12.3 {"a"=>10, "b"=>20} -- Posted via http://www.ruby-forum.com/.