summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-05-22 16:52:19 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-05-22 16:52:19 +0900
commit32dd1a798a6d042dbf91e24e9c9f44d94e68f721 (patch)
tree39cc54dcf00f97d40d8516d83521d0da33b4831e
parent4d93340d3836bc454cee0c74715a412d090ff178 (diff)
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.
-rw-r--r--gc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gc.c b/gc.c
index 6df81b959c..394fd277e2 100644
--- a/gc.c
+++ b/gc.c
@@ -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)));
}