Skip to content

Commit 54c2edc

Browse files
committed
Fix Namespace#inspect to display its internal id
1 parent b94df81 commit 54c2edc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

namespace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ rb_namespace_inspect(VALUE obj)
10151015
}
10161016
ns = rb_get_namespace_t(obj);
10171017
r = rb_str_new_cstr("#<Namespace:");
1018-
rb_str_concat(r, rb_funcall(rb_obj_id(obj), rb_intern("to_s"), 0));
1018+
rb_str_concat(r, rb_funcall(LONG2NUM(ns->ns_id), rb_intern("to_s"), 0));
10191019
if (NAMESPACE_BUILTIN_P(ns)) {
10201020
rb_str_cat_cstr(r, ",builtin");
10211021
}

0 commit comments

Comments
 (0)