Issue #7572 has been updated by shugo (Shugo Maeda).

File defineclass_fix.diff added
Status changed from Open to Assigned
Assignee set to ko1 (Koichi Sasada)

?????違?с?????

tadf (tadayoshi funaba) wrote:
> ????劫??臂?????????鴻?若????若???鴻????????鴻?с?????????????絎????????????若????????篋?????????????
> 
> $ ruby -v -e 'class Foo < nil; end'
> ruby 2.0.0dev (2012-12-16 trunk 38415) [i686-linux]

篁ヤ???????????????潟?潟????ゃ?????????'class Foo; end'???'class Foo < nil; end'???????????巡擦??????
???c?????障?????????????????с?????

$ cat defineclass.rb 
ary = RubyVM::InstructionSequence.compile(<<EOF).disasm
class Foo; end
class Foo < nil; end
EOF
print ary
$ ruby defineclass.rb
== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace            1                                               (   1)
0002 putspecialobject 3
0004 putnil           
0005 defineclass      :Foo, <class:Foo>, 3
0009 pop              
0010 trace            1                                               (   2)
0012 putspecialobject 3
0014 putnil           
0015 defineclass      :Foo, <class:Foo>, 3
0019 leave            
...

define_type???鴻?若????若???鴻?????絎????????????????????茵????????違??菴遵????????????????????羞私???????障?????
??????違?羝?????鴻????????吾????????潟????若?с???????????????蚊??羂????????障??????????????????????????????с????????? > ???????????????

??鴻?若????若???鴻?????絎?????????????c????翫?????nil??с???Qundef???putobject????????????????????
?????c?????с????????r12621???荀???????Qundef???VM??鴻?帥?????臀?????????拷??????с?????????
----------------------------------------
Bug #7572: ????劫??臂?????????鴻?若????若???鴻????????鴻?с?????????????絎????????????若????????篋??????????
https://bugs.ruby-lang.org/issues/7572#change-34800

Author: tadf (tadayoshi funaba)
Status: Assigned
Priority: Low
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2012-12-16 trunk 38415) [i686-linux]


????劫??臂?????????鴻?若????若???鴻????????鴻?с?????????????絎????????????若????????篋?????????????

$ ruby -v -e 'class Foo < nil; end'
ruby 2.0.0dev (2012-12-16 trunk 38415) [i686-linux]

$ ruby -v -e 'class Foo < false; end'
ruby 2.0.0dev (2012-12-16 trunk 38415) [i686-linux]

$ ruby -v -e 'class Foo < true; end'
ruby 2.0.0dev (2012-12-16 trunk 38415) [i686-linux]
-e:1:in `<main>': wrong argument type true (expected Class) (TypeError)



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