From 199037b95bf883b35833844b8fc2996d7cbd8536 Mon Sep 17 00:00:00 2001 From: Kurt Kilpela Date: Thu, 17 Oct 2024 12:56:17 -0700 Subject: [PATCH] Fix float parsing in GemStone. GemStone 3.7.2 changed the behavior of `1 raisedToInteger: -3` to return a fraction instead of a float. This update ensure that a float is returned. This commit resolves https://github.com/dalehenrich/rb/issues/12 --- .../instance/makeIntegerOrScaledInteger.st | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repository/Squeak.v37.package/SqNumberParser.class/instance/makeIntegerOrScaledInteger.st b/repository/Squeak.v37.package/SqNumberParser.class/instance/makeIntegerOrScaledInteger.st index beb04bc30..1dc1c8bfe 100644 --- a/repository/Squeak.v37.package/SqNumberParser.class/instance/makeIntegerOrScaledInteger.st +++ b/repository/Squeak.v37.package/SqNumberParser.class/instance/makeIntegerOrScaledInteger.st @@ -6,7 +6,7 @@ makeIntegerOrScaledInteger neg ifTrue: [integerPart := integerPart negated]. self readExponent - ifTrue: [^integerPart * (base raisedToInteger: exponent)]. + ifTrue: [^integerPart * (base asFloat raisedToInteger: exponent)]. self readScale ifTrue: [^integerPart asScaledDecimal: scale]. - ^ integerPart \ No newline at end of file + ^ integerPart