From: "David A. Black" Date: 2008-05-01T23:46:41+09:00 Subject: Re: References in Ruby Hi -- On Thu, 1 May 2008, marc wrote: > Marcin Tyman said... > >> I was quite a bit confused when write following code: >> >> a = 10 >> b = a >> a = 50 >> >> puts b # -> puts 10 >> >> Why?? Since everything is a reference in Ruby I expected "puts 50". > > The way I think of it is that 10 and 50 are objects. And indeed they are :-) David -- Rails training from David A. Black and Ruby Power and Light: INTRO TO RAILS June 9-12 Berlin ADVANCING WITH RAILS June 16-19 Berlin INTRO TO RAILS June 24-27 London (Skills Matter) See http://www.rubypal.com for details and updates!