diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-27 08:22:17 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-27 08:22:17 +0000 |
commit | 322b26795583a0b854e7b195e7f766bd479c0404 (patch) | |
tree | 031edd791b725b9fb8a343fb083aa26eb70b4ae7 /io.c | |
parent | 674b2526650f317a5a836130631651dbdb019913 (diff) |
merge revision(s) 45979: [Backport #9847]
* io.c (io_setstrbuf): always check if the buffer is modifiable.
[ruby-core:62643] [Bug #9847]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@46580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2253,8 +2253,8 @@ io_setstrbuf(VALUE *str, long len) VALUE s = StringValue(*str); long clen = RSTRING_LEN(s); if (clen >= len) { + rb_str_modify(s); if (clen != len) { - rb_str_modify(s); rb_str_set_len(s, len); } return; |