[BUG][PATCH] YAML::load doesn't recognize symbol as it should
Reported by Le Huy | January 30th, 2008 @ 02:15 AM | in 1.0 preview
irb(main):001:0> require 'yaml'
=> true
irb(main):002:0> YAML.load(File.read('bool.yml'))
=> {":foo"=>true, ":bar"=>false}
irb(main):003:0> YAML.load(":foo: hello")
=> {":foo"=>"hello"}
it should return
{:foo=>"hello"}
Comments and changes to this ticket
-
zimbatm January 30th, 2008 @ 06:19 AM
- → State changed from new to open
-
Le Huy January 30th, 2008 @ 04:21 PM
I have verified that it is an error of RbYAML lib included in current Rubinius
-
Ruben Nine February 1st, 2008 @ 07:36 PM
Attached a patch that adds support for tag:yaml.org,2002:sym.
Included specs for this new type and other types.
$ bin/mspec spec/ruby/1.8/library/yaml/resolver_spec.rb
Started
.........
Finished in 0.541319 seconds
9 examples, 13 expectations, 0 failures, 0 errors
-
Ruben Nine February 1st, 2008 @ 07:44 PM
- → Title changed from [BUG] YAML::load doesn't recognize symbol as it should to [BUG][PATCH] YAML::load doesn't recognize symbol as it should
Seems like I forgot updating the title.
-
zimbatm February 3rd, 2008 @ 07:11 AM
nice ruben9 !
can you repost the patch, using git-format-patch ?
-
-
zimbatm February 4th, 2008 @ 02:43 PM
- → State changed from open to resolved
Thanks, pushed to the repo as 4e18d1cf49573b1fa3f484686352734aa39457d0.
Give that hash to evan an he will give you commit access.
Have fun !
-
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
