Yaml WTF

What do you suppose this evaluates to in Ruby YAML:


YAML.load("18:00")

The string "18:00"? The hash {18 => 0} ? Wrong. The answer is: 1080.

Why? Sexagesimal of course! As used by the ancient Sumerians.

1 Comment

EvgenyNovember 30th, 2008 at 4:05 am

And YAML.load(”1:0:0″) would tell us how many seconds there are in one hour … even though YAML.load(”1:0:0:0″) would tell us how many seconds there are in 2.5 days.

Leave a comment

Your comment