« Return to Thread: [ruby-dev:36672] [Bug #616] instance_eval and Module#to_s

[ruby-dev:37534] [Bug #616] instance_eval and Module#to_s

by Dennis Ranke-2 :: Rate this Message:

Reply to Author | View in Thread

チケット #616 が更新されました。 (by Akira Tanaka)


1.8 と 1.9 で、C の定義先が違う。
1.8 ではグローバル。1.9 では main の特異クラスの中に定義される。

% ./ruby -ve 'instance_eval{p((C = Class.new).to_s)};    
class << self
  p C
end
'
ruby 1.9.1 (2008-12-21 revision 20902) [i686-linux]
"#<Class:0x825d5c0>"
#<Class:0x825d5c0>

1.9 が正しい?
----------------------------------------
http://redmine.ruby-lang.org/issues/show/616

----------------------------------------
http://redmine.ruby-lang.org

 « Return to Thread: [ruby-dev:36672] [Bug #616] instance_eval and Module#to_s