mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f0ba57341a
commit
77e876615d
21 changed files with 89 additions and 101 deletions
3
class.c
3
class.c
|
@ -11,6 +11,7 @@
|
|||
**********************************************************************/
|
||||
|
||||
#include "ruby.h"
|
||||
#include "rubysig.h"
|
||||
#include "node.h"
|
||||
#include "st.h"
|
||||
#include <ctype.h>
|
||||
|
@ -526,6 +527,7 @@ rb_singleton_class(obj)
|
|||
rb_bug("unknown immediate %d", obj);
|
||||
}
|
||||
|
||||
DEFER_INTS;
|
||||
if (FL_TEST(RBASIC(obj)->klass, FL_SINGLETON)) {
|
||||
klass = RBASIC(obj)->klass;
|
||||
}
|
||||
|
@ -541,6 +543,7 @@ rb_singleton_class(obj)
|
|||
FL_UNSET(klass, FL_TAINT);
|
||||
}
|
||||
if (OBJ_FROZEN(obj)) OBJ_FREEZE(klass);
|
||||
ALLOW_INTS;
|
||||
|
||||
return klass;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue