mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
ext: real class name
* ext/dl/cptr.c (rb_dlptr_inspect): use real class name, not singleton class. * ext/fiddle/pointer.c (rb_fiddle_ptr_inspect): ditto. * ext/strscan/strscan.c (strscan_inspect): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
56e96b9f73
commit
7e9bd8f72c
3 changed files with 6 additions and 6 deletions
|
@ -391,7 +391,7 @@ rb_dlptr_inspect(VALUE self)
|
||||||
|
|
||||||
TypedData_Get_Struct(self, struct ptr_data, &dlptr_data_type, data);
|
TypedData_Get_Struct(self, struct ptr_data, &dlptr_data_type, data);
|
||||||
return rb_sprintf("#<%"PRIsVALUE":%p ptr=%p size=%ld free=%p>",
|
return rb_sprintf("#<%"PRIsVALUE":%p ptr=%p size=%ld free=%p>",
|
||||||
CLASS_OF(self), data, data->ptr, data->size, data->free);
|
rb_obj_class(self), data, data->ptr, data->size, data->free);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -430,7 +430,7 @@ rb_fiddle_ptr_inspect(VALUE self)
|
||||||
|
|
||||||
TypedData_Get_Struct(self, struct ptr_data, &fiddle_ptr_data_type, data);
|
TypedData_Get_Struct(self, struct ptr_data, &fiddle_ptr_data_type, data);
|
||||||
return rb_sprintf("#<%"PRIsVALUE":%p ptr=%p size=%ld free=%p>",
|
return rb_sprintf("#<%"PRIsVALUE":%p ptr=%p size=%ld free=%p>",
|
||||||
CLASS_OF(self), data, data->ptr, data->size, data->free);
|
rb_obj_class(self), data, data->ptr, data->size, data->free);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1159,17 +1159,17 @@ strscan_inspect(VALUE self)
|
||||||
|
|
||||||
p = check_strscan(self);
|
p = check_strscan(self);
|
||||||
if (NIL_P(p->str)) {
|
if (NIL_P(p->str)) {
|
||||||
a = rb_sprintf("#<%"PRIsVALUE" (uninitialized)>", CLASS_OF(self));
|
a = rb_sprintf("#<%"PRIsVALUE" (uninitialized)>", rb_obj_class(self));
|
||||||
return infect(a, p);
|
return infect(a, p);
|
||||||
}
|
}
|
||||||
if (EOS_P(p)) {
|
if (EOS_P(p)) {
|
||||||
a = rb_sprintf("#<%"PRIsVALUE" fin>", CLASS_OF(self));
|
a = rb_sprintf("#<%"PRIsVALUE" fin>", rb_obj_class(self));
|
||||||
return infect(a, p);
|
return infect(a, p);
|
||||||
}
|
}
|
||||||
if (p->curr == 0) {
|
if (p->curr == 0) {
|
||||||
b = inspect2(p);
|
b = inspect2(p);
|
||||||
a = rb_sprintf("#<%"PRIsVALUE" %ld/%ld @ %"PRIsVALUE">",
|
a = rb_sprintf("#<%"PRIsVALUE" %ld/%ld @ %"PRIsVALUE">",
|
||||||
CLASS_OF(self),
|
rb_obj_class(self),
|
||||||
p->curr, S_LEN(p),
|
p->curr, S_LEN(p),
|
||||||
b);
|
b);
|
||||||
return infect(a, p);
|
return infect(a, p);
|
||||||
|
@ -1177,7 +1177,7 @@ strscan_inspect(VALUE self)
|
||||||
a = inspect1(p);
|
a = inspect1(p);
|
||||||
b = inspect2(p);
|
b = inspect2(p);
|
||||||
a = rb_sprintf("#<%"PRIsVALUE" %ld/%ld %"PRIsVALUE" @ %"PRIsVALUE">",
|
a = rb_sprintf("#<%"PRIsVALUE" %ld/%ld %"PRIsVALUE" @ %"PRIsVALUE">",
|
||||||
CLASS_OF(self),
|
rb_obj_class(self),
|
||||||
p->curr, S_LEN(p),
|
p->curr, S_LEN(p),
|
||||||
a, b);
|
a, b);
|
||||||
return infect(a, p);
|
return infect(a, p);
|
||||||
|
|
Loading…
Add table
Reference in a new issue