1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/date/date_core.c: uses to_integer instead.

* test/date/test_switch_hitter.rb: added a test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tadf 2011-12-20 12:03:42 +00:00
parent 15e6d26049
commit 5aea2ad18c
4 changed files with 90 additions and 21 deletions

View file

@ -181,13 +181,6 @@ 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