diff --git a/basis/math/ratios/ratios.factor b/basis/math/ratios/ratios.factor index bf572ac352..b71d28f7da 100644 --- a/basis/math/ratios/ratios.factor +++ b/basis/math/ratios/ratios.factor @@ -41,7 +41,7 @@ M: integer recip ] if-zero ; M: ratio recip - >fraction swap fraction> ; + >fraction swap dup 0 < [ [ neg ] bi@ ] when fraction> ; M: ratio hashcode* nip >fraction [ hashcode ] bi@ bitxor ;