From 8778079bd32e0ff9398d66d1b1da9c33641ddf1d Mon Sep 17 00:00:00 2001 From: Gary Palter Date: Fri, 24 Jul 2020 21:53:51 -0400 Subject: [PATCH] Fix issue #336 --- level-0/l0-numbers.lisp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/level-0/l0-numbers.lisp b/level-0/l0-numbers.lisp index 37b0c7dba..e9198a729 100644 --- a/level-0/l0-numbers.lisp +++ b/level-0/l0-numbers.lisp @@ -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