1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* string.c (rb_str_cmp_m): two small bugs fixed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2003-02-21 03:52:27 +00:00
parent 8fc299e8bc
commit b3686317a7
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,7 @@
Fri Feb 21 12:45:50 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* string.c (rb_str_cmp_m): two small bugs fixed.
Fri Feb 21 08:03:09 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* gc.c (rb_gc_mark): inline rb_gc_mark_children().

View file

@ -816,10 +816,11 @@ rb_str_cmp_m(str1, str2)
else {
VALUE tmp = rb_funcall(str2, rb_intern("<=>"), 1, str1);
if (NIL_P(tmp)) return Qnil;
if (!FIXNUM_P(tmp)) {
return rb_funcall(LONG2FIX(0), '-', tmp);
return rb_funcall(LONG2FIX(0), '-', 1, tmp);
}
result = FIX2LONG(tmp);
result = -FIX2LONG(tmp);
}
}
else {