From: "Hal E. Fulton" Date: 2002-06-13T03:02:09+09:00 Subject: Re: Trick or Bug? ----- Original Message ----- From: "Nikodemus Siivola" To: "ruby-talk ML" Sent: Wednesday, June 12, 2002 5:26 AM Subject: Trick or Bug? > All this talk of block local variables reminded me of a funny trick... > > As you know, receivers in ruby cannot change their class? No become, etc. > Right? > > Wrong: > > #!/usr/bin/env ruby > a = proc { a = 1 } > puts "a is a #{a.class}" > a.call > puts "a is a #{a.class}" Clever, but not correct, I think. You've just pointed 'a' to a different object, not changed the class of the original object. As I understand 'become' in Smalltalk (and I don't really) doesn't it operate on an object? Hal Fulton