From: Li Chen Date: 2009-07-23T12:14:21+09:00 Subject: Re: why I get an empty hash? 7stud -- wrote: > Method calls are replaced in your code by the return value of the > method. So calling meth1 results in this: > > > h = {} > {'AA' => 0} #from meth2 > > return h Hi, I think I now understand why I can't get expected hash: I do nothing about the value of method call after it returns. Here is the line that returns the hash: ... h={} temp_hash=method2 h.merge(tem_hash) return h Thanks, Li -- Posted via http://www.ruby-forum.com/.