Project

General

Profile

Actions

Bug #5736

closed

Numeric#quo should convert with #to_r

Added by john_firebaugh (John Firebaugh) over 12 years ago. Updated almost 11 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin10.8.0]
Backport:
[ruby-core:41575]

Description

Numeric#quo currently constructs a Rational with self as the raw numerator, doing no coercion, before dividing. Instead it should follow the same pattern as Numeric#{numerator,denominator}, and convert self with #to_r. This allows any Numeric subclass to participate in the type conversion.


Files

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0