* string.c (rb_str_upto): method result must be checked. [ruby-dev:24504]

* eval.c (error_print): ditto.  [ruby-dev:24519]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2004-10-18 23:47:32 +00:00
parent f2549e0bf7
commit 39324f819f
3 changed files with 64 additions and 56 deletions

View File

@ -1,3 +1,9 @@
Tue Oct 19 08:47:21 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* string.c (rb_str_upto): method result must be checked. [ruby-dev:24504]
* eval.c (error_print): ditto. [ruby-dev:24519]
Mon Oct 18 23:37:05 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* marshal.c (r_object0): check inheritance by the internal function.

1
eval.c
View File

@ -1130,6 +1130,7 @@ error_print()
eclass = CLASS_OF(ruby_errinfo);
if (EXEC_TAG() == 0) {
e = rb_funcall(ruby_errinfo, rb_intern("message"), 0, 0);
StringValue(e);
einfo = RSTRING(e)->ptr;
elen = RSTRING(e)->len;
}

View File

@ -1418,6 +1418,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;