psych parses ":"-delimited time strings differently than syck
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 597
- Forks
- 223
- Avg merge
- 11h 23m
- Merged PRs (30d)
- 3
Description
I'm not sure if this is a bug or changed behavior, perhaps I could get some clarification or resolution via this issue:
colon-delimited strings of integers are parsed by YAML into integer number of seconds. it appears that the psych engine treats the last unit as minutes, whereas syck treated it as seconds, ie.:
#1.9.3
ruby-1.9.3-p392>> require 'yaml'
=> true
ruby-1.9.3-p392>> YAML.load '1:00'
=> 3600
ruby-1.9.3-p392>> YAML::ENGINE.yamler = 'syck'
=> "syck"
ruby-1.9.3-p392>> YAML.load '1:00'
=> 60
#2.0.0
ruby-2.0.0-p195>> require 'yaml'
=> true
ruby-2.0.0-p195>> YAML.load '1:00'
=> 3600
if this change of behavior is documented somewhere, I'd appreciate if you could point me to it.
thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the YAML.load examples for psych and syck, focusing on how ":"-delimited integer strings are interpreted. Trace the Psych YAML.load entry point and existing parser tests to determine the intended unit semantics. Done means resolving or documenting the psych-versus-syck behavior and adding coverage for the reported examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100