* test/date/test_date_base.rb (test_jd): tests for

[ruby-dev:45008].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-12-20 02:49:15 +00:00
parent a9b0e34b97
commit f26ee7454f
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Tue Dec 20 11:49:13 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* test/date/test_date_base.rb (test_jd): tests for
[ruby-dev:45008].
Tue Dec 20 10:20:48 2011 NARUSE, Yui <naruse@ruby-lang.org>
* ext/date/date_core.c (wholenum): fix the type of the return value.

View File

@ -181,6 +181,13 @@ class TestDateBase < Test::Unit::TestCase
def test_jd
assert_equal(1 << 33, Date.jd(1 << 33).jd)
bug = '[ruby-dev:45008]'
d = Date.new(2011,12,20)
jd = d.jd
assert_equal(d, Date.jd(jd))
assert_equal(d, Date.jd(jd.to_f), bug)
assert_equal(d, Date.jd(Rational(jd)), bug)
end
def test_mjd