mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Fix Namespace#inspect
to display its internal id
This commit is contained in:
parent
b94df81be2
commit
54c2edc05d
1 changed files with 1 additions and 1 deletions
|
@ -1015,7 +1015,7 @@ rb_namespace_inspect(VALUE obj)
|
|||
}
|
||||
ns = rb_get_namespace_t(obj);
|
||||
r = rb_str_new_cstr("#<Namespace:");
|
||||
rb_str_concat(r, rb_funcall(rb_obj_id(obj), rb_intern("to_s"), 0));
|
||||
rb_str_concat(r, rb_funcall(LONG2NUM(ns->ns_id), rb_intern("to_s"), 0));
|
||||
if (NAMESPACE_BUILTIN_P(ns)) {
|
||||
rb_str_cat_cstr(r, ",builtin");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue