[#35027] [Ruby 1.9-Bug#4352][Open] [patch] Fix eval(s, b) backtrace; make eval(s, b) consistent with eval(s) — "James M. Lawrence" <redmine@...>

Bug #4352: [patch] Fix eval(s, b) backtrace; make eval(s, b) consistent with eval(s)

16 messages 2011/02/01

[#35114] [Ruby 1.9-Bug#4373][Open] http.rb:677: [BUG] Segmentation fault — Christian Fazzini <redmine@...>

Bug #4373: http.rb:677: [BUG] Segmentation fault

59 messages 2011/02/06

[#35171] [Ruby 1.9-Bug#4386][Open] encoding: directive does not affect regex expressions — mathew murphy <redmine@...>

Bug #4386: encoding: directive does not affect regex expressions

9 messages 2011/02/09

[#35237] [Ruby 1.9-Bug#4400][Open] nested at_exit hooks run in strange order — Suraj Kurapati <redmine@...>

Bug #4400: nested at_exit hooks run in strange order

12 messages 2011/02/15

[ruby-core:35173] Re: [Ruby 1.9-Bug#4383] psych fails to parse a symbol in a flow sequence

From: Aaron Patterson <aaron@...>
Date: 2011-02-09 21:45:57 UTC
List: ruby-core #35173
On Thu, Feb 10, 2011 at 04:21:05AM +0900, Charles Nutter wrote:
> Issue #4383 has been updated by Charles Nutter.
> 
> 
> JRuby, using a different library SnakeYAML (itself a port of libyaml) exhibits the same error:
> 
> ~/projects/jruby ➔ jruby --1.9 -rpsych -ryaml -ve 'p YAML.load("order: [ :year, :month, :day ]")'
> jruby 1.6.0.RC2 (ruby 1.9.2 patchlevel 136) (2011-02-08 3d4720a) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_22) [darwin-x86_64-java]
> org/jruby/ext/psych/PsychParser.java:242:in `parse': while parsing a flow node; expected the node content, but found Value (RuntimeError)
> 	from /Users/headius/projects/jruby/lib/ruby/1.9/psych.rb:148:in `parse_stream'
> 	from /Users/headius/projects/jruby/lib/ruby/1.9/psych.rb:119:in `parse'
> 	from /Users/headius/projects/jruby/lib/ruby/1.9/psych.rb:106:in `load'
> 	from -e:1:in `(root)'

Yay for consistency?  ;-)

Looks like this is a bug in both libyaml and SnakeYAML.  According to
other people on the yaml-core list, this example should be valid:

  http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTimfwVXs_qbWV-Tqng_6HYwVSU_FSkQGWT2KLE9n%40mail.gmail.com&forum_name=yaml-core
  http://yaml.org/ypaste/802/index.html

It seems that colons in flow sequences cause ambiguity problems.  The
python community has already encountered these problems (yay for sharing
code) and have started a wiki page to try coming to a solution:

  http://pyyaml.org/wiki/YAMLColonInFlowContext

I will add this example to the wiki.

As this is a bug in libyaml (and SnakeYAML), should we close this ticket
as a third party issue?

-- 
Aaron Patterson
http://tenderlovemaking.com/

In This Thread

Prev Next