summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--test/ruby/test_rational.rb3
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 972c46f2ac..a89c7ead53 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Dec 3 02:56:34 2008 Yusuke Endoh <[email protected]>
+
+ * test/ruby/test_rational.rb: add a test.
+
Wed Dec 3 02:53:24 2008 Yusuke Endoh <[email protected]>
* test/ruby/test_range.rb: add a test.
diff --git a/test/ruby/test_rational.rb b/test/ruby/test_rational.rb
index 5758749d5e..4c031b9848 100644
--- a/test/ruby/test_rational.rb
+++ b/test/ruby/test_rational.rb
@@ -129,6 +129,9 @@ class Rational_Test < Test::Unit::TestCase
assert_raise(ArgumentError){Rational(Object.new)}
assert_raise(ArgumentError){Rational()}
assert_raise(ArgumentError){Rational(1,2,3)}
+
+ assert_equal(Complex(Rational(1, 2), Rational(1, 2)), Rational(Complex(1, 1), Complex(2, 0)))
+ assert_instance_of(Numeric, Rational.class_eval { convert(Numeric.new) })
end
def test_attr