From: dblack@... Date: 2007-01-27T09:15:30+09:00 Subject: Re: pass by reference? Hi -- On Sat, 27 Jan 2007, Per Velschow wrote: > Andy Koch wrote: >> Hello, >> >> Is there a way to pass variables by reference into function. >> >> I have large string to pass and the pass by value seems to be eating up >> too much memory. >> > Everything is pass-by-reference in Ruby. There is no pass-by-value. So > your memory problems must have another cause. I've always looked at it as: pass by value, where the "values" are (mostly) references. For example: a = "abcde" # a now contains a reference to that string do_something(a) # pass the reference contained in a David -- Q. What is THE Ruby book for Rails developers? A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black) (See what readers are saying! http://www.rubypal.com/r4rrevs.pdf) Q. Where can I get Ruby/Rails on-site training, consulting, coaching? A. Ruby Power and Light, LLC (http://www.rubypal.com)