Skip to content

Commit

Permalink
Fix issue #336
Browse files Browse the repository at this point in the history
  • Loading branch information
gmpalter committed Jul 25, 2020
1 parent 67c2378 commit 8778079
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions level-0/l0-numbers.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,12 @@

(defun %maybe-make-ratio (numerator denominator res)
(if res
(progn
(require-type res 'ratio)
(setf (%numerator res) numerator
(%denominator res) denominator)
res)
(number-case res
(ratio
(setf (%numerator res) numerator
(%denominator res) denominator))
(t
(%make-ratio numerator denominator)))
(%make-ratio numerator denominator)))

; this is no longer used
Expand Down

0 comments on commit 8778079

Please sign in to comment.