Issue #4971 has been updated by matz (Yukihiro Matsumoto).

Assignee changed from matz (Yukihiro Matsumoto) to nobu (Nobuyoshi Nakada)

??????????????????????????constants?????????????????????????????????????
????????????中?????????????????????????????

----------------------------------------
Bug #4971: Module#class_variables
https://bugs.ruby-lang.org/issues/4971#change-28038

Author: shugo (Shugo Maeda)
Status: Assigned
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: core
Target version: 2.0.0
ruby -v: -


Ruby 1.9??????Module#class_variables??????????????????????????????????????????????????????

  class Foo
    @@foo = 123
  end
  
  class Bar < Foo
    @@bar = 456
  end
  
  p Bar.class_variables #=> 1.8????["@@bar", "@@foo"], 1.9????[:@@bar]

commit log????

    * variable.c (rb_mod_class_variables): class variables are no longer
      inherited.  [ruby-dev:23808]
    
????????????????????????????????????????????????1.8????1.9??????????
??????????????????????????????????
Bar.class_variable_get(:@@foo)?????????????????class_variables???:@@foo???
???????????????????????????????????



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