From bf01a8204bac52cdc078e7c82922bf10863adfc4 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 24 Apr 2012 13:06:59 -0700 Subject: * eval.c (range_v_func, range_v_star_func): Restore the order of arguments to plus, so that the from object is on the left. This change was introduced in a commit on 2012-02-14, causing character ranges to break due to bug that addition did not commute for char + fixnum. Although the previous commit fixed the regression, it's still good to have the object on the left in case there are some future data types in case there is ever some form of addition which does not commute. --- ChangeLog | 11 +++++++++++ eval.c | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fa75afb6..f26ed8b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2012-04-24 Kaz Kylheku + + * eval.c (range_v_func, range_v_star_func): Restore the order of + arguments to plus, so that the from object is on the left. This + change was introduced in a commit on 2012-02-14, causing + character ranges to break due to bug that addition did not + commute for char + fixnum. Although the previous commit fixed + the regression, it's still good to have the object on the + left in case there are some future data types in case there + is ever some form of addition which does not commute. + 2012-04-24 Kaz Kylheku * arith.c (plus): Fixed broken (+ fixnum char) case. diff --git a/eval.c b/eval.c index 9caec011..337f4f80 100644 --- a/eval.c +++ b/eval.c @@ -1856,7 +1856,7 @@ static val rangev_func(val env, val lcons) cons_bind (to, step, to_step); val next = if3(functionp(step), funcall1(step, from), - plus(step, from)); + plus(from, step)); rplaca(lcons, from); @@ -1891,7 +1891,7 @@ static val range_star_v_func(val env, val lcons) cons_bind (to, step, to_step); val next = if3(functionp(step), funcall1(step, from), - plus(step, from)); + plus(from, step)); rplaca(lcons, from); -- cgit v1.2.3