summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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';