Project

General

Profile

Actions

Bug #7568

closed

Yaml fails to encode zero date string.

Added by anshul (Anshul Khandelwal) almost 10 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
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'

Actions

Also available in: Atom PDF