mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* class.c (rb_define_class): raise TypeError same as class
statement. [ruby-core:27504] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
01629be729
commit
b4da253400
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Jan 10 04:54:36 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* class.c (rb_define_class): raise TypeError same as class
|
||||
statement. [ruby-core:27504]
|
||||
|
||||
Sun Jan 10 04:41:20 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/mkmf.rb (configuration): needs ARCH_FLAG.
|
||||
|
|
2
class.c
2
class.c
|
@ -441,7 +441,7 @@ rb_define_class(const char *name, VALUE super)
|
|||
rb_raise(rb_eTypeError, "%s is not a class", name);
|
||||
}
|
||||
if (rb_class_real(RCLASS_SUPER(klass)) != super) {
|
||||
rb_name_error(id, "%s is already defined", name);
|
||||
rb_raise(rb_eTypeError, "superclass mismatch for class %s", name);
|
||||
}
|
||||
return klass;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue