summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--string.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c97883b837..4a1a4ce070 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Oct 19 08:46:57 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * string.c (rb_str_upto): method result must be checked. [ruby-dev:24504]
+
Mon Oct 18 23:37:05 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* marshal.c (r_object0): check inheritance by the internal function.
diff --git a/string.c b/string.c
index d70ea21868..75e828e7d0 100644
--- a/string.c
+++ b/string.c
@@ -1408,6 +1408,7 @@ rb_str_upto(beg, end, excl)
rb_yield(current);
if (!excl && rb_str_equal(current, end)) break;
current = rb_funcall(current, succ, 0, 0);
+ StringValue(current);
if (excl && rb_str_equal(current, end)) break;
if (RSTRING(current)->len > RSTRING(end)->len)
break;