summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-04 12:30:06 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-04 12:30:06 +0000
commit102ccac988dc4f27fb3ad9286e4177aef138a170 (patch)
treee663af648eee76eb84a69a90f3c16dc099330d45 /string.c
parent52e721592fc2f9bcb55cfbbd7002ae0ff7003338 (diff)
merges r23160 from trunk into ruby_1_9_1.
-- * string.c (rb_str_dump): buffer length plus one byte for null terminator. [ruby-dev:38294] * test/ruby/test_m17n.rb (test_str_dump): add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 1603354391..8e264d53aa 100644
--- a/string.c
+++ b/string.c
@@ -4167,7 +4167,7 @@ rb_str_dump(VALUE str)
result = rb_str_new5(str, 0, len);
p = RSTRING_PTR(str); pend = p + RSTRING_LEN(str);
- q = RSTRING_PTR(result); qend = q + len;
+ q = RSTRING_PTR(result); qend = q + len + 1;
*q++ = '"';
while (p < pend) {