You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Ruby 1.9.3, Yaml 1.3.4 (also happens with Ruby 2.1.5, YAML2.0.5):
irb(main):009:0> YAML.load("---\nx")
=> "x" # Correct
irb(main):010:0> YAML.load("---\n%x")
Psych::SyntaxError: (): found uknown directive name while scanning a directive at line 2 column 1
from /usr/lib/ruby/1.9.1/psych.rb:203:in parse' from /usr/lib/ruby/1.9.1/psych.rb:203:inparse_stream'
from /usr/lib/ruby/1.9.1/psych.rb:151:in parse' from /usr/lib/ruby/1.9.1/psych.rb:127:inload'
from (irb):10
from /usr/bin/irb:12:in `
'
I see the 'uknown' typo has been fixed.
The text was updated successfully, but these errors were encountered:
Psych uses libyaml as it's parser, and libyaml only supports YAML 1.1 grammar right now. Once libyaml is updated to support 1.2, then Psych will support 1.2. Thanks!
According to the YAML 1.2 grammar:
[209] l-directive-document ::= l-directive+ l-explicit-document ;
[82] l-directive ::= “%” ( ns-yaml-directive | ns-tag-directive | ns-reserved-directive ) s-l-comments ;
[208] l-explicit-document ::= c-directives-end ( l-bare-document | ( e-node s-l-comments ) ) ;
[203] c-directives-end ::= “-” “-” “-”
Using Ruby 1.9.3, Yaml 1.3.4 (also happens with Ruby 2.1.5, YAML2.0.5):
'irb(main):009:0> YAML.load("---\nx")
=> "x" # Correct
irb(main):010:0> YAML.load("---\n%x")
Psych::SyntaxError: (): found uknown directive name while scanning a directive at line 2 column 1
from /usr/lib/ruby/1.9.1/psych.rb:203:in
parse' from /usr/lib/ruby/1.9.1/psych.rb:203:in
parse_stream'from /usr/lib/ruby/1.9.1/psych.rb:151:in
parse' from /usr/lib/ruby/1.9.1/psych.rb:127:in
load'from (irb):10
from /usr/bin/irb:12:in `
I see the 'uknown' typo has been fixed.
The text was updated successfully, but these errors were encountered: