Skip to content

Commit 2b840c3

Browse files
committed
ensure liftFixnumInteger() calls get errbacks arg
1 parent 70a7be6 commit 2b840c3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/js/base/js-numbers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ define("pyret-base/js/js-numbers", function() {
128128
}
129129

130130
if (typeof(x) === 'number') {
131-
x = liftFixnumInteger(x, y);
131+
x = liftFixnumInteger(x, y, errbacks);
132132
}
133133
if (typeof(y) === 'number') {
134-
y = liftFixnumInteger(y, x);
134+
y = liftFixnumInteger(y, x, errbacks);
135135
}
136136

137137
if (x instanceof Roughnum) {

tests/jsnums-test/jsnums-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,8 @@ R(["pyret-base/js/js-numbers"], function(JN) {
429429

430430
expect(JN.equals(n3p14, JN.Rational.makeInstance(314, 100, sampleErrbacks), sampleErrbacks))
431431
.toBe(true);
432-
// further ensure that liftFixnumInteger(3.14, <rational>) produces a rational
433-
// whose numerator and denominator are integers
432+
// further ensure that liftFixnumInteger(3.14, <rational>, ...) produces a
433+
// valid rational whose numerator and denominator are integers
434434
expect(JN.isInteger(n3p14.numerator(sampleErrbacks))).toBe(true);
435435
expect(JN.isInteger(n3p14.denominator(sampleErrbacks))).toBe(true);
436436
//

0 commit comments

Comments
 (0)