summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-04-25 13:57:01 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-04-25 13:57:01 +0000
commitb134b912780e0fd84fbc107a9362e45f04391b47 (patch)
tree3aad53ec0421149c8fb9e163379bba8efb2ab42e /numeric.c
parent4ec25bdd63c8cb9acf70880666c1d113ae0cb51e (diff)
* various files: macro fix-up by Michal Rokos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/numeric.c b/numeric.c
index 01dadb8471..3d97c52181 100644
--- a/numeric.c
+++ b/numeric.c
@@ -805,12 +805,12 @@ num_step(argc, argv, from)
long i = 0;
if (unit > 0) {
- for (i=0; n<=end; i++, n=unit*i+beg) {
+ for (i=0; n<=end; i++, n=beg+unit*i) {
rb_yield(rb_float_new(n));
}
}
else {
- for (i=0; n>=end; i++, n=unit*i+beg) {
+ for (i=0; n>=end; i++, n=beg+unit*i) {
rb_yield(rb_float_new(n));
}
}