summaryrefslogtreecommitdiff
path: root/range.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-07 05:01:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-07 05:01:56 +0000
commit94ecf211e574a3d8440efb5018d41fd0e1a92d1b (patch)
tree7e08e9b5fabac42109941c46d305effda1420360 /range.c
parent61d0d8babbdeabd8776a1c6bafb038be963d2dbc (diff)
downloadbundler-94ecf211e574a3d8440efb5018d41fd0e1a92d1b.tar.gz
* range.c (r_le): fixed types.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'range.c')
-rw-r--r--range.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/range.c b/range.c
index 4021d7d844..3ffbb750fc 100644
--- a/range.c
+++ b/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);
}