Loading YAML fails if they have a character in the supplementary plane:
jruby-9.1.5.0 :002 > require 'yaml'; YAML.load('೬')
=> "೬"
jruby-9.1.5.0 :003 > require 'yaml'; YAML.load('1🎁')
Psych::SyntaxError: (): 'reader' unacceptable character ' at line 0 column 0
from org/jruby/ext/psych/PsychParser.java:231:in `parse'
from /home/glopes/.rvm/rubies/jruby-9.1.5.0/lib/ruby/stdlib/psych.rb:376:in `parse_stream'
from /home/glopes/.rvm/rubies/jruby-9.1.5.0/lib/ruby/stdlib/psych.rb:324:in `parse'
from /home/glopes/.rvm/rubies/jruby-9.1.5.0/lib/ruby/stdlib/psych.rb:251:in `load'
from (irb):3:in `'
from org/jruby/RubyKernel.java:995:in `eval'
from org/jruby/RubyKernel.java:1296:in `loop'
from org/jruby/RubyKernel.java:1115:in `catch'
from org/jruby/RubyKernel.java:1115:in `catch'
from /home/glopes/.rvm/rubies/jruby-9.1.5.0/bin/irb:13:in `'
Confusingly, it says the error is at line 0 column 0.
Can confirm, got bitten by it while trying to parse emoji-powered YML.
Linux db25a270ce82 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016
x86_64 Linux
java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)
LANG=C.UTF-8
y8 commentedFeb 15, 2017
•
edited
See original issue: ruby/psych#293
I can confirm this behaviour on 1.7.25, 9.1.5.0, 9.1.6.0 and 9.1.7.0
OS:
Java:
ENV:
The text was updated successfully, but these errors were encountered: