Arturas Slajus created JRUBY-6402:
-------------------------------------
Summary: YAML parser << feature broken in 1.9
Key: JRUBY-6402
URL: https://jira.codehaus.org/browse/JRUBY-6402
Project: JRuby
Issue Type: Bug
Components: Ruby 1.8.7, Ruby 1.9.2
Affects Versions: JRuby 1.6.6
Reporter: Arturas Slajus
<< in YAML allows you to extend a hash, overriding its values.
{noformat}
arturas@zeus:~/work/spacegame/flex$ cat yamlbug.rb
require 'yaml'
require 'pp'
yaml = %Q{
flex: &flex
path: flex/assets
flex_unbundled:
# Override path for unbundled assets.
<<:
path: flex/src/assets
<<: *flex
}
pp YAML.load(yaml)
{noformat}
1.8 mode gives you override, as you would expect.
{noformat}
arturas@zeus:~/work/spacegame/flex$ jruby yamlbug.rb
{"flex"=>{"path"=>"flex/assets"},
"flex_unbundled"=>{"path"=>"flex/src/assets"}}
{noformat}
1.9 mode does not...
{noformat}
arturas@zeus:~/work/spacegame/flex$ jruby --1.9 yamlbug.rb
{"flex"=>{"path"=>"flex/assets"},
"flex_unbundled"=>{"<<"=>{"path"=>"flex/src/assets"}, "path"=>"flex/assets"}}
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email