diff options
-rw-r--r-- | variable.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/variable.c b/variable.c index 3c3b689889..5dd286bb4c 100644 --- a/variable.c +++ b/variable.c @@ -2855,7 +2855,8 @@ rb_const_set(VALUE klass, ID id, VALUE val) int parental_path_permanent; VALUE parental_path = classname(klass, &parental_path_permanent); if (NIL_P(parental_path)) { - parental_path = rb_funcall(klass, rb_intern("to_s"), 0); + int throwaway; + parental_path = rb_tmp_class_path(klass, &throwaway, make_temporary_path); } if (parental_path_permanent && !val_path_permanent) { set_namespace_path(val, build_const_path(parental_path, id)); |