Project

General

Profile

Actions

Bug #7568

closed

Yaml fails to encode zero date string.

Added by anshul (Anshul Khandelwal) over 11 years ago. Updated about 5 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux]
[ruby-core:50913]

Description

"0000-00-00 00:00:00".to_yaml fails with an ArgumentError.

Reproducing steps

In irb type,

require 'yaml'
"0000-00-00 00:00:00".to_yaml

What was expected

=> "--- '0000-00-00 00:00:00'\n"

What happened

ArgumentError: argument out of range
from /usr/local/rbenv/versions/1.9.3-p327/lib/ruby/1.9.1/psych/scalar_scanner.rb:111:in `utc'

Updated by Anonymous over 11 years ago

  • Status changed from Open to Assigned
  • Assignee set to tenderlovemaking (Aaron Patterson)

=begin
This was fixed in r37288.

It might be worth backporting the fix to 1.9.3. Thoughts tenderlove?
=end

Updated by Anonymous over 11 years ago

On Sun, Dec 16, 2012 at 12:53:14PM +0900, charliesome (Charlie Somerville) wrote:

Issue #7568 has been updated by charliesome (Charlie Somerville).

Status changed from Open to Assigned
Assignee set to tenderlovemaking (Aaron Patterson)

=begin
This was fixed in r37288.

It might be worth backporting the fix to 1.9.3. Thoughts tenderlove?

Ya, I can submit a backport ticket. I need to figure out which commits
should go in to a bugfix release of psych. The alternative is just to
release a new version of the gem, and we don't need to backport
anything.

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

Updated by luislavena (Luis Lavena) over 11 years ago

On Wed, Dec 19, 2012 at 3:06 PM, Aaron Patterson
wrote:

Ya, I can submit a backport ticket. I need to figure out which commits
should go in to a bugfix release of psych. The alternative is just to
release a new version of the gem, and we don't need to backport
anything.

The problem with that approach is on a new patchlevel release the user
will get "downgraded" to a previous version of the gem, where the
problem exists.

--
Luis Lavena
AREA 17

Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Updated by Anonymous over 11 years ago

On Thu, Dec 20, 2012 at 11:40:10PM +0900, Luis Lavena wrote:

On Wed, Dec 19, 2012 at 3:06 PM, Aaron Patterson
wrote:

Ya, I can submit a backport ticket. I need to figure out which commits
should go in to a bugfix release of psych. The alternative is just to
release a new version of the gem, and we don't need to backport
anything.

The problem with that approach is on a new patchlevel release the user
will get "downgraded" to a previous version of the gem, where the
problem exists.

Good point. I'll figure out the appropriate backport requests. :-)

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

Actions #5

Updated by tenderlovemaking (Aaron Patterson) about 5 years ago

  • Status changed from Assigned to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0