summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/rational.rb4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 79b409e0b8..c5ee307e0d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat May 24 00:34:59 2008 Tanaka Akira <akr@fsij.org>
+
+ * lib/rational.rb (Rational#to_i): fix rdoc. Rational(-7,4).to_i
+ should be -1.
+
Fri May 23 16:46:28 2008 Akinori MUSHA <knu@iDaemons.org>
* enumerator.c (proc_call): Remove an unused static function.
diff --git a/lib/rational.rb b/lib/rational.rb
index 4d0097b02e..69a3b76bf1 100644
--- a/lib/rational.rb
+++ b/lib/rational.rb
@@ -344,12 +344,12 @@ class Rational < Numeric
# Converts the rational to an Integer. Not the _nearest_ integer, the
# truncated integer. Study the following example carefully:
# Rational(+7,4).to_i # -> 1
- # Rational(-7,4).to_i # -> -2
+ # Rational(-7,4).to_i # -> -1
# (-1.75).to_i # -> -1
#
# In other words:
# Rational(-7,4) == -1.75 # -> true
- # Rational(-7,4).to_i == (-1.75).to_i # false
+ # Rational(-7,4).to_i == (-1.75).to_i # -> true
#