summaryrefslogtreecommitdiff
path: root/range.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-18 06:59:41 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-18 06:59:41 +0000
commitda155576adf92e32898fa6b545a3f85009f904b9 (patch)
tree875486754b6859acc4ca221e7ad9143e2937654b /range.c
parentf4e88fb23a0da8c3afea4e437db34626be4578a5 (diff)
* range.c (range_step, range_each): need cast.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'range.c')
-rw-r--r--range.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/range.c b/range.c
index a48ee73..26fbb4b 100644
--- a/range.c
+++ b/range.c
@@ -338,7 +338,8 @@ range_step(argc, argv, range)
if (unit == 0) rb_raise(rb_eArgError, "step can't be 0");
args[0] = b; args[1] = e; args[2] = range;
iter[0] = 1; iter[1] = unit;
- rb_iterate(str_step, (VALUE)args, step_i, (VALUE)iter);
+ rb_iterate((VALUE(*)_((VALUE)))str_step, (VALUE)args, step_i,
+ (VALUE)iter);
}
else if (rb_obj_is_kind_of(b, rb_cNumeric)) {
ID c = rb_intern(EXCL(range) ? "<" : "<=");
@@ -421,7 +422,8 @@ range_each(range)
args[0] = beg; args[1] = end; args[2] = range;
iter[0] = 1; iter[1] = 1;
- rb_iterate(str_step, (VALUE)args, step_i, (VALUE)iter);
+ rb_iterate((VALUE(*)_((VALUE)))str_step, (VALUE)args, step_i,
+ (VALUE)iter);
}
else {
range_each_func(range, each_i, beg, end, NULL);