> 
> brian@airstream:~$ irb
> irb(main):001:0> def test
> irb(main):002:1> n = 1
> irb(main):003:1> n = yield(n)
> irb(main):004:1> puts n
> irb(main):005:1> end
> => nil
> irb(main):006:0> test {|x| x += 1; puts x; x }
> 2
> 2
> => nil

how can I force x pass by ref ? then I can change the value of x in the
block and no need to hv a return value and assign statement.
-- 
Posted via http://www.ruby-forum.com/.