diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-12-04 04:53:31 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-12-04 04:53:31 +0000 |
commit | dc6de95cf2f61f3c2dd11b85d67894dbb208b2ec (patch) | |
tree | 4755b13166d7e50d7c4f01d0b44a79f8dce4dc8c /string.c | |
parent | 2db0bdd9c0bf9e63708400d4bb8c5e8890e21bb3 (diff) | |
download | ruby-dc6de95cf2f61f3c2dd11b85d67894dbb208b2ec.tar.gz |
* io.c (io_fread): EAGAIN/EWOULDBLOCK should not terminate and
throw away the input.
* time.c (time_new_internal): underflow adjustment must not use
negative div/mod.
* time.c (time_cmp): should consider tv_usec on non Fixnum number
comparison.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 16 |
1 files changed, 1 insertions, 15 deletions
@@ -563,27 +563,13 @@ rb_str_cmp(str1, str2) return -1; } -VALUE -to_str(str) - VALUE str; -{ - return rb_funcall(str, rb_intern("to_str"), 0); -} - -static VALUE -str_or_nil(str) - VALUE str; -{ - return rb_rescue(to_str, str, 0, 0); -} - static VALUE rb_str_equal(str1, str2) VALUE str1, str2; { if (str1 == str2) return Qtrue; if (TYPE(str2) != T_STRING) { - str2 = str_or_nil(str2); + str2 = rb_check_convert_type(str2, T_STRING, "String", "to_str"); if (NIL_P(str2)) return Qfalse; } |