summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-05-15 09:35:02 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2012-05-15 09:35:02 -0700
commit5be67a387507958aa2e7c5b35035bd1941c0ac1b (patch)
tree67061528b8ae081cee414a3b87cc8bc50e46d60f /test
parent1606060069c13b2bcdc672a1a0e89202a9eb5166 (diff)
downloadpsych-5be67a387507958aa2e7c5b35035bd1941c0ac1b.zip
* ext/psych/lib/psych/visitors/to_ruby.rb: convert omap tagged maps to
Psych::Omap objects rather than hashes. [Bug #6425] * test/psych/test_omap.rb: pertinent test.
Diffstat (limited to 'test')
-rw-r--r--test/psych/test_omap.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/psych/test_omap.rb b/test/psych/test_omap.rb
index 53f55f5..34df724 100644
--- a/test/psych/test_omap.rb
+++ b/test/psych/test_omap.rb
@@ -2,6 +2,13 @@ require 'psych/helper'
module Psych
class TestOmap < TestCase
+ def test_parse_as_map
+ o = Psych.load "--- !!omap\na: 1\nb: 2"
+ assert_kind_of Psych::Omap, o
+ assert_equal 1, o['a']
+ assert_equal 2, o['b']
+ end
+
def test_self_referential
map = Psych::Omap.new
map['foo'] = 'bar'