1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2000-10-13 09:01:58 +00:00
parent 12d1bc6bd5
commit 52f90f6566
6 changed files with 48 additions and 15 deletions

View file

@ -341,6 +341,7 @@ rb_struct_to_s(s)
VALUE str = rb_str_new(0, strlen(cname) + 4);
sprintf(RSTRING(str)->ptr, "#<%s>", cname);
RSTRING(str)->len = strlen(RSTRING(str)->ptr);
return str;
}
@ -389,6 +390,7 @@ rb_struct_inspect(s)
VALUE str = rb_str_new(0, strlen(cname) + 8);
sprintf(RSTRING(str)->ptr, "#<%s:...>", cname);
RSTRING(str)->len = strlen(RSTRING(str)->ptr);
return str;
}
return rb_protect_inspect(inspect_struct, s, 0);