Skip to content

Commit

Permalink
Fix float parsing in GemStone.
Browse files Browse the repository at this point in the history
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 dalehenrich/rb#12
  • Loading branch information
kurtkilpela committed Oct 17, 2024
1 parent bd10283 commit 0482c5c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ 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
^ integerPart

0 comments on commit 0482c5c

Please sign in to comment.