aboutsummaryrefslogtreecommitdiffstats
path: root/test/psych/test_json_tree.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/psych/test_json_tree.rb')
-rw-r--r--test/psych/test_json_tree.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/psych/test_json_tree.rb b/test/psych/test_json_tree.rb
index 423a528b81..b694560367 100644
--- a/test/psych/test_json_tree.rb
+++ b/test/psych/test_json_tree.rb
@@ -31,6 +31,17 @@ module Psych
assert_match(/['"]two['"]/, json)
end
+ class Bar
+ def encode_with coder
+ coder.represent_seq 'omg', %w{ a b c }
+ end
+ end
+
+ def test_json_list_dump_exclude_tag
+ json = Psych.to_json Bar.new
+ refute_match('omg', json)
+ end
+
def test_list_to_json
list = %w{ one two }
json = Psych.to_json(list)