summaryrefslogtreecommitdiff
path: root/range.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-23 03:39:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-23 03:39:44 +0000
commit5a993c5d220bca6eb8b5a8a3afe842f28140508c (patch)
treeb359b38e8093ef0bebaf6a9b77cf91887eddaec3 /range.c
parenta97e80ba74c98853c71ea9efc258487987057867 (diff)
* range.c: fixed type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'range.c')
-rw-r--r--range.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/range.c b/range.c
index 86cfeee892..1c735d0ed2 100644
--- a/range.c
+++ b/range.c
@@ -151,10 +151,10 @@ r_lt(VALUE a, VALUE b)
VALUE r = rb_funcall(a, id_cmp, 1, b);
if (NIL_P(r))
- return Qfalse;
+ return (int)Qfalse;
if (rb_cmpint(r, a, b) < 0)
- return Qtrue;
- return Qfalse;
+ return (int)Qtrue;
+ return (int)Qfalse;
}
static int
@@ -164,13 +164,13 @@ r_le(VALUE a, VALUE b)
VALUE r = rb_funcall(a, id_cmp, 1, b);
if (NIL_P(r))
- return Qfalse;
+ return (int)Qfalse;
c = rb_cmpint(r, a, b);
if (c == 0)
return (int)INT2FIX(0);
if (c < 0)
- return Qtrue;
- return Qfalse;
+ return (int)Qtrue;
+ return (int)Qfalse;
}
@@ -677,8 +677,8 @@ rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp)
excl = EXCL(range);
}
else {
- if (!rb_respond_to(range, id_beg)) return Qfalse;
- if (!rb_respond_to(range, id_end)) return Qfalse;
+ if (!rb_respond_to(range, id_beg)) return (int)Qfalse;
+ if (!rb_respond_to(range, id_end)) return (int)Qfalse;
b = rb_funcall(range, id_beg, 0);
e = rb_funcall(range, id_end, 0);
excl = RTEST(rb_funcall(range, rb_intern("exclude_end?"), 0));
@@ -686,7 +686,7 @@ rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp)
*begp = b;
*endp = e;
*exclp = excl;
- return Qtrue;
+ return (int)Qtrue;
}
VALUE