[TZInfo-users] DateTime.new! removal from ruby-core
Aaron Patterson
aaron at tenderlovemaking.com
Mon Jun 6 13:28:57 EDT 2011
Hi,
I filed a ticket a while back about DateTime.new! being removed from
ruby-core. It looks like that was fixed, and replaced with using
DateTime.jd (thanks!)
Unfortunately, I'm running in to some test failures on rails when using that
implementation. I can boil it down to this code:
require 'date'
require 'tzinfo/ruby_core_support'
x = Rational(39014323, 16)
p TZInfo::RubyCoreSupport.datetime_new!(x)
When I run this with 1.9.2, I get this output:
#<DateTime: 1963-12-31T16:30:00+00:00 (39014323/16,0,2299161)>
When I run with 1.9.3dev, I get this:
/Users/aaron/svn/tzinfo/tzinfo/lib/tzinfo/ruby_core_support.rb:63:in `jd': invalid fraction (ArgumentError)
from /Users/aaron/svn/tzinfo/tzinfo/lib/tzinfo/ruby_core_support.rb:63:in `datetime_new!'
from test.rb:5:in `<main>'
Any help would be greatly appreciated.
--
Aaron Patterson
http://tenderlovemaking.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/tzinfo-users/attachments/20110606/7ddf021f/attachment.bin>
More information about the TZInfo-users
mailing list