1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

gc.c: revert b00f280d4b "Eagerly name modules and classes"

* gc.c (rb_raw_obj_info): new string objects cannot allocate to
  create new class path name during GC.
This commit is contained in:
Nobuyoshi Nakada 2019-05-22 16:52:19 +09:00
parent 4d93340d38
commit 32dd1a798a
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

6
gc.c
View file

@ -11097,7 +11097,7 @@ rb_raw_obj_info(char *buff, const int buff_size, VALUE obj)
}
else {
if (RTEST(RBASIC(obj)->klass)) {
VALUE class_path = rb_class_path(RBASIC(obj)->klass);
VALUE class_path = rb_class_path_cached(RBASIC(obj)->klass);
if (!NIL_P(class_path)) {
APPENDF((BUFF_ARGS, "(%s)", RSTRING_PTR(class_path)));
}
@ -11151,7 +11151,7 @@ rb_raw_obj_info(char *buff, const int buff_size, VALUE obj)
case T_CLASS:
case T_MODULE:
{
VALUE class_path = rb_class_path(obj);
VALUE class_path = rb_class_path_cached(obj);
if (!NIL_P(class_path)) {
APPENDF((BUFF_ARGS, "%s", RSTRING_PTR(class_path)));
}
@ -11159,7 +11159,7 @@ rb_raw_obj_info(char *buff, const int buff_size, VALUE obj)
}
case T_ICLASS:
{
VALUE class_path = rb_class_path(RBASIC_CLASS(obj));
VALUE class_path = rb_class_path_cached(RBASIC_CLASS(obj));
if (!NIL_P(class_path)) {
APPENDF((BUFF_ARGS, "src:%s", RSTRING_PTR(class_path)));
}