diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-10-13 09:01:58 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-10-13 09:01:58 +0000 |
commit | 81d5e984b1efabde327b5676965e0c138d32bf63 (patch) | |
tree | 2923343175f8d63a52649189131c6e642b4574dd /struct.c | |
parent | 9f4072870b5fd9a2aaba0b3ee6b79cc937300804 (diff) | |
download | ruby-81d5e984b1efabde327b5676965e0c138d32bf63.tar.gz ruby-81d5e984b1efabde327b5676965e0c138d32bf63.tar.xz ruby-81d5e984b1efabde327b5676965e0c138d32bf63.zip |
matz
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'struct.c')
-rw-r--r-- | struct.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); |