mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/psych/lib/psych/visitors/yaml_tree.rb: fix symbol keys in coder
emission. Thanks @tjwallace * test/psych/test_coder.rb: test for change git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0cb251e079
commit
2a58706e2d
3 changed files with 9 additions and 3 deletions
|
|
@ -85,7 +85,7 @@ module Psych
|
|||
end
|
||||
|
||||
def encode_with coder
|
||||
coder.represent_map self.class.name, { 'a' => 'b' }
|
||||
coder.represent_map self.class.name, { "string" => 'a', :symbol => 'b' }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ module Psych
|
|||
|
||||
def test_represent_map
|
||||
thing = Psych.load(Psych.dump(RepresentWithMap.new))
|
||||
assert_equal({ 'a' => 'b' }, thing.map)
|
||||
assert_equal({ "string" => 'a', :symbol => 'b' }, thing.map)
|
||||
end
|
||||
|
||||
def test_represent_sequence
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue