From: Robert Dober Date: 2007-03-08T16:45:54+09:00 Subject: Re: Setting default vales On 3/8/07, Michael Strelnikov wrote: > > > > > > Well I tried hard with Binding.of_caller from facet but maybe I miss > > something. > > As I mentioned before I am not a metaprogramming guru :( > > > :) > > > Also, can I pass a "reference"/"pointer" into function? > > Well all parameters are passed as references - even if there is a > > studied discussion if this terminology is 100% correct. > > > > try e.g. > > a="Hi there" > > def change s > > s << "!!!" > > end > > change a > > puts a > > > > > > Probably it works with strings but try following code: > > def test_change(var, val) > var = val > end > > myvar = 5 > test_change(myvar, 10) > puts myvar.to_s > They second I sent the mail I knew I was not precise enough :( Variables themselves are passed as values, stupid me how could I have been so imprecise. Only that all variables are than references to objects which can be changed unless they are immutable. thy Michael and sorry for my hasty post Robert -- We have not succeeded in answering all of our questions. In fact, in some ways, we are more confused than ever. But we feel we are confused on a higher level and about more important things. -Anonymous