Project

General

Profile

Actions

Bug #4776

closed

DateTime.new! has been disabled

Added by tenderlovemaking (Aaron Patterson) almost 13 years ago. Updated almost 13 years ago.

Status:
Rejected
Target version:
-
ruby -v:
ruby 1.9.3dev (2011-06-06 trunk 31944) [x86_64-darwin10.7.0]
Backport:
[ruby-core:36444]

Description

After r31668, DateTime.new! no longer works. Is there a replacement? Or is this a mistake?

This code works before r31668, but breaks after 31668:

irb(main):001:0> require 'date'
=> true
irb(main):002:0> DateTime.new!
NoMethodError: undefined method new!' for DateTime:Class from (irb):2 from /Users/aaron/.local/bin/irb:12:in '
irb(main):003:0>

Some gems (specifically the tzinfo gem) depend on this method. Rails depends on tzinfo, and since tzinfo breaks I can no longer test trunk against rails. :-(


Files

noname (500 Bytes) noname tenderlovemaking (Aaron Patterson), 05/28/2011 07:59 AM

Updated by tenderlovemaking (Aaron Patterson) almost 13 years ago

  • ruby -v changed from ruby 1.9.3dev (2011-05-24 trunk 31718) [x86_64-darwin10.7.0] to -

On Wed, May 25, 2011 at 09:26:10AM +0900, Aaron Patterson wrote:

Issue #4776 has been reported by Aaron Patterson.


Bug #4776: DateTime.new! has been disabled
http://redmine.ruby-lang.org/issues/4776

Author: Aaron Patterson
Status: Open
Priority: Normal
Assignee: tadayoshi funaba
Category:
Target version:
ruby -v: ruby 1.9.3dev (2011-05-24 trunk 31718) [x86_64-darwin10.7.0]

After r31668, DateTime.new! no longer works. Is there a replacement? Or is this a mistake?

This code works before r31668, but breaks after 31668:

irb(main):001:0> require 'date'
=> true
irb(main):002:0> DateTime.new!
NoMethodError: undefined method new!' for DateTime:Class from (irb):2 from /Users/aaron/.local/bin/irb:12:in '
irb(main):003:0>

Some gems (specifically the tzinfo gem) depend on this method. Rails depends on tzinfo, and since tzinfo breaks I can no longer test trunk against rails. :-(

Bump?

--
Aaron Patterson
http://tenderlovemaking.com/

Updated by tenderlovemaking (Aaron Patterson) almost 13 years ago

  • ruby -v changed from - to ruby 1.9.3dev (2011-06-06 trunk 31944) [x86_64-darwin10.7.0]

Hello? :(

Updated by tadf (tadayoshi funaba) almost 13 years ago

  • Status changed from Open to Rejected

not a bug.

it's for only internal use.
he must have known it.
i once talked to the authour of tzinfo about Rational.new!.

anyway now DateTime.new! is not reasonable at all.
it does not depend on the current internal structure.
it is not fast if avairable.

learn good manners.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0