[#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:35165] [Ruby 1.8-Bug#4385][Open] YAML encoding error

From: Andrey Stikheev <redmine@...>
Date: 2011-02-09 13:55:23 UTC
List: ruby-core #35165
Bug #4385: YAML encoding error
http://redmine.ruby-lang.org/issues/show/4385

Author: Andrey Stikheev
Status: Open, Priority: Normal
Category: lib, Target version: Ruby 1.8.7
ruby -v: ruby 1.8.7 (2010-12-23 patchlevel 330) [i686-darwin10.6.0]

I'm found a strange behavior of YAML in ruby 1.8.7 on simple string:

ruby-1.8.7-p330 :002 > require 'yaml'
 => true 
ruby-1.8.7-p330 :003 > YAML::load("\n {\n}".to_yaml)
ArgumentError: syntax error on line 3, col 0: `}'
	from /Users/sand/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/yaml.rb:133:in `load'
	from /Users/sand/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/yaml.rb:133:in `load'
	from (irb):3


In ruby 1.9.2 seems to be all fine:

ruby-1.9.2-head :011 >   require 'yaml'
 => true 
ruby-1.9.2-head :012 > YAML::load("\n {\n}".to_yaml)
 => "\n {\n}" 


Encoding results:

ruby-1.9.2-head :002 > "\n {\n}".to_yaml
 => "--- \"\\n {\\n\\\n}\"\n" 

ruby-1.8.7-p330 :002 > "\n {\n}".to_yaml
 => "--- |-\n\n {\n}\n" 




I'm check this on Mac OS and FreeBSD:

Darwin 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386
FreeBSD 8.0-STABLE FreeBSD 8.0-STABLE


----------------------------------------
http://redmine.ruby-lang.org

In This Thread

Prev Next