summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-24 17:28:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-24 17:28:56 +0000
commit6dd9388545183868ac08ab2dad7b3d4c4a4b07e4 (patch)
tree254497843ddd0fbf60ee700008bf99071bc50990 /string.c
parent01e9a7be61ad5a9be0fe3a0c6c469d03ff21f51e (diff)
* string.c (rb_str_chomp_bang): coderange may change.
[ruby-core:22414] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22608 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 7da6a0e955..a2f9e4af4b 100644
--- a/string.c
+++ b/string.c
@@ -6056,7 +6056,7 @@ rb_str_chomp_bang(int argc, VALUE *argv, VALUE str)
memcmp(RSTRING_PTR(rs), pp, rslen) == 0)) {
if (rb_enc_left_char_head(p, pp, e, enc) != pp)
return Qnil;
- str_modify_keep_cr(str);
+ rb_str_modify(str);
STR_SET_LEN(str, RSTRING_LEN(str) - rslen);
RSTRING_PTR(str)[RSTRING_LEN(str)] = '\0';
return str;