From: ts <decoux@...>
Date: 2008-05-20T00:53:57+09:00
Subject: [1.9] instance_eval / instance_exec


 Who is right ?

vgs% ./ruby -ve '12.instance_eval { @@a }'
ruby 1.9.0 (2008-05-19 revision 16483) [i686-linux]
-e:1:in `block in <main>': uninitialized class variable @@a in Fixnum (NameError)
	from -e:1:in `instance_eval'
	from -e:1:in `<main>'
vgs% 

vgs% ./ruby -ve '12.instance_exec { @@a }'
ruby 1.9.0 (2008-05-19 revision 16483) [i686-linux]
-e:1:in `block in <main>': no class variables available (TypeError)
	from -e:1:in `instance_exec'
	from -e:1:in `<main>'
vgs% 


Guy Decoux