diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-23 03:39:44 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-23 03:39:44 +0000 |
| commit | 1691a1fdf95a5b71fcee9473e02e0b009103e353 (patch) | |
| tree | b359b38e8093ef0bebaf6a9b77cf91887eddaec3 | |
| parent | 4d7c55ad9260b9e56b67d98b562042195c988d3c (diff) | |
| download | ruby-1691a1fdf95a5b71fcee9473e02e0b009103e353.tar.gz ruby-1691a1fdf95a5b71fcee9473e02e0b009103e353.tar.xz ruby-1691a1fdf95a5b71fcee9473e02e0b009103e353.zip | |
* range.c: fixed type.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | range.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -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 |
