From: Peter Hickman Date: 2010-04-14T00:48:44+09:00 Subject: Re: scope limitation causes problems for me. --0016e6d99ca14a79ef0484202ad9 Content-Type: text/plain; charset=ISO-8859-1 You either need to pass m as a parameter def func(m) begin m["a"] = "merong" rescue => e puts e end end and call it like func(m) or make m global $m = Hash.new("merong") $m["b"] = "babo" def func begin $m["a"] = "merong" rescue => e puts e end end func I recommend the first way --0016e6d99ca14a79ef0484202ad9--