summaryrefslogtreecommitdiff
path: root/test/psych/test_coder.rb
diff options
context:
space:
mode:
authorJeff Wallace <jeff@zozi.com>2013-01-25 12:20:37 -0800
committerJeff Wallace <jeff@zozi.com>2013-01-30 09:07:57 -0800
commitd28928569780d564e944b3a59b012ad40f10b93f (patch)
treeaed37faf0f5f8b40c72124e3082d56e6416ad22d /test/psych/test_coder.rb
parent2e8f82404c3911618e3dc3bec3a9e5e6b414f95a (diff)
downloadpsych-d28928569780d564e944b3a59b012ad40f10b93f.zip
Fix case when map includes a symbol key in #emit_coder
Mimic what is done in #visit_Hash. Fixes #107.
Diffstat (limited to 'test/psych/test_coder.rb')
-rw-r--r--test/psych/test_coder.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/psych/test_coder.rb b/test/psych/test_coder.rb
index 7539c7d..58769ad 100644
--- a/test/psych/test_coder.rb
+++ b/test/psych/test_coder.rb
@@ -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