mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* range.c (r_le): fixed types.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
61d0d8babb
commit
94ecf211e5
2 changed files with 7 additions and 5 deletions
|
@ -1,4 +1,6 @@
|
|||
Thu May 7 13:58:52 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Thu May 7 14:01:55 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* range.c (r_le): fixed types.
|
||||
|
||||
* range.c (range_eql): fixed rdoc.
|
||||
|
||||
|
|
8
range.c
8
range.c
|
@ -161,7 +161,7 @@ r_le(VALUE a, VALUE b)
|
|||
return Qfalse;
|
||||
c = rb_cmpint(r, a, b);
|
||||
if (c == 0)
|
||||
return INT2FIX(0);
|
||||
return (int)INT2FIX(0);
|
||||
if (c < 0)
|
||||
return Qtrue;
|
||||
return Qfalse;
|
||||
|
@ -213,7 +213,7 @@ range_eql(VALUE range, VALUE obj)
|
|||
static VALUE
|
||||
range_hash(VALUE range)
|
||||
{
|
||||
unsigned hash = EXCL(range);
|
||||
unsigned long hash = EXCL(range);
|
||||
VALUE v;
|
||||
|
||||
hash = rb_hash_start(hash);
|
||||
|
@ -242,9 +242,9 @@ range_each_func(VALUE range, VALUE (*func) (VALUE, void *), void *arg)
|
|||
}
|
||||
}
|
||||
else {
|
||||
while (RTEST(c = r_le(v, e))) {
|
||||
while ((c = r_le(v, e)) != Qfalse) {
|
||||
(*func) (v, arg);
|
||||
if (c == INT2FIX(0))
|
||||
if (c == (int)INT2FIX(0))
|
||||
break;
|
||||
v = rb_funcall(v, id_succ, 0, 0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue