summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-08 08:31:25 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-08 08:31:25 +0000
commit0f7ef7046c146b7ae5b8e1c5936260055f4fc4ce (patch)
treed0ee499c056f056137e344d72ebad6bdd9a18002
parent99d6a7f0acb451167e693759e5d4bc08dd50ffe5 (diff)
downloadruby-0f7ef7046c146b7ae5b8e1c5936260055f4fc4ce.tar.gz
ruby-0f7ef7046c146b7ae5b8e1c5936260055f4fc4ce.tar.xz
ruby-0f7ef7046c146b7ae5b8e1c5936260055f4fc4ce.zip
* string.c (rb_str_chop_bang): reset coderange. [ruby-core:23155]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--string.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 090f42a1a..74469588e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Apr 8 17:29:29 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * string.c (rb_str_chop_bang): reset coderange. [ruby-core:23155]
+
Wed Apr 8 14:00:04 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/mkmf.rb (what_type?): fixed typo, and refined for member of
diff --git a/string.c b/string.c
index f3f8ae5d7..2744ea94b 100644
--- a/string.c
+++ b/string.c
@@ -5935,7 +5935,7 @@ rb_str_chop_bang(VALUE str)
{
if (RSTRING_LEN(str) > 0) {
long len;
- str_modify_keep_cr(str);
+ rb_str_modify(str);
len = chopped_length(str);
STR_SET_LEN(str, len);
RSTRING_PTR(str)[len] = '\0';