From: Lloyd Linklater Date: 2007-07-28T03:42:18+09:00 Subject: Re: How to pass arguments by reference in a function ashishwave wrote: > For example: if i want to write my own swap function (not using > multiple assignment syntax a,b=b,a) just for example example, how to > implement that in ruby That reminds me, in the old days you could do a swap without a third variable using XOR. e.g. a = 13 b = 17 a ^= b b ^= a a ^= b and they are swapped. I know that Ruby might do it as mentioned above. My question is, which is more efficient? -- Posted via http://www.ruby-forum.com/.