Bug #6477

BigDecimal to_i and to_int methods

Added by Anuj Dutta almost 2 years ago. Updated almost 2 years ago.

[ruby-core:45177]
Status:Rejected
Priority:Normal
Assignee:-
Category:-
Target version:-
ruby -v:1.9.3-p194 Backport:

Description

Hello,

Why are there two methods, toi and toint, in BigDecimal when they are exactly same in terms of functionality. Here's the link to the docs:

http://www.ruby-doc.org/stdlib-1.9.3/libdoc/bigdecimal/rdoc/BigDecimal.html#method-i-to_i

Am I missing something? Please enlighten.

Thanks.

History

#1 Updated by Nobuyoshi Nakada almost 2 years ago

  • Status changed from Open to Rejected

=begin
They are not specific to (({BigDecimal})).

(({toi})) is for explicit conversion, called by users.
(({to
int})) is for implicit conversion, called by core/libraries.
=end

Also available in: Atom PDF