From 37d0c509b77cc99f793063ea111400eada192138 Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 20 Nov 2014 08:04:29 +0000 Subject: * test/psych/json/test_stream.rb (Psych::JSON::TestStream::test_list_to_json): escape `]`. * test/psych/test_json_tree.rb (Psych::JSON::TestJSONTree#test_list_to_json): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/psych/json/test_stream.rb | 2 +- test/psych/test_json_tree.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/psych/json/test_stream.rb b/test/psych/json/test_stream.rb index 4690ad2f1e..b0c33e6a2a 100644 --- a/test/psych/json/test_stream.rb +++ b/test/psych/json/test_stream.rb @@ -65,7 +65,7 @@ module Psych @stream.push list json = @io.string - assert_match(/]$/, json) + assert_match(/\]$/, json) assert_match(/^--- \[/, json) assert_match(/["]one["]/, json) assert_match(/["]two["]/, json) diff --git a/test/psych/test_json_tree.rb b/test/psych/test_json_tree.rb index 60f8321e68..a23fc1ac8f 100644 --- a/test/psych/test_json_tree.rb +++ b/test/psych/test_json_tree.rb @@ -45,7 +45,7 @@ module Psych def test_list_to_json list = %w{ one two } json = Psych.to_json(list) - assert_match(/]$/, json) + assert_match(/\]$/, json) assert_match(/^\[/, json) assert_match(/"one"/, json) assert_match(/"two"/, json) -- cgit v1.2.3