* object.c (rb_class_superclass): should not raise exception for
BasicObject. [ruby-Bugs-15668] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7a978073c9
commit
a2946d85ec
@ -1,3 +1,8 @@
|
|||||||
|
Mon Nov 19 17:48:30 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* object.c (rb_class_superclass): should not raise exception for
|
||||||
|
BasicObject. [ruby-Bugs-15668]
|
||||||
|
|
||||||
Mon Nov 19 16:04:08 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Mon Nov 19 16:04:08 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* array.c (rb_ary_permutation): gives all permutations of elements
|
* array.c (rb_ary_permutation): gives all permutations of elements
|
||||||
|
1
object.c
1
object.c
@ -1410,6 +1410,7 @@ rb_class_superclass(VALUE klass)
|
|||||||
VALUE super = RCLASS_SUPER(klass);
|
VALUE super = RCLASS_SUPER(klass);
|
||||||
|
|
||||||
if (!super) {
|
if (!super) {
|
||||||
|
if (klass == rb_cBasicObject) return Qnil;
|
||||||
rb_raise(rb_eTypeError, "uninitialized class");
|
rb_raise(rb_eTypeError, "uninitialized class");
|
||||||
}
|
}
|
||||||
while (TYPE(super) == T_ICLASS) {
|
while (TYPE(super) == T_ICLASS) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user