mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* class.c (rb_class_init_copy): singleton class is disallowed to copy,
from its definition. fixed: [ruby-talk:142749] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a3c29ec51a
commit
db218799e8
2 changed files with 7 additions and 1 deletions
|
@ -1,8 +1,11 @@
|
|||
Mon May 16 22:21:44 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Mon May 16 22:28:43 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* win32/win32.h, {bcc32,win32,wince}/Makefile.sub: moved rb_[ugp]id_t
|
||||
to get rid of redefinition warnings on mingw.
|
||||
|
||||
* class.c (rb_class_init_copy): singleton class is disallowed to copy,
|
||||
from its definition. fixed: [ruby-talk:142749]
|
||||
|
||||
Mon May 16 03:29:01 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
||||
|
||||
* win32/win32.{h,c}: define rb_{p,g,u}id_t.
|
||||
|
|
3
class.c
3
class.c
|
@ -105,6 +105,9 @@ rb_class_init_copy(clone, orig)
|
|||
if (RCLASS(clone)->super != 0) {
|
||||
rb_raise(rb_eTypeError, "already initialized class");
|
||||
}
|
||||
if (FL_TEST(orig, FL_SINGLETON)) {
|
||||
rb_raise(rb_eTypeError, "can't copy singleton class");
|
||||
}
|
||||
return rb_mod_init_copy(clone, orig);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue