ruby-changes:36431
From: usa <ko1@a...>
Date: Thu, 20 Nov 2014 17:04:36 +0900 (JST)
Subject: [ruby-changes:36431] usa:r48512 (trunk): * test/psych/json/test_stream.rb (Psych::JSON::TestStream::test_list_to_json):
usa 2014-11-20 17:04:29 +0900 (Thu, 20 Nov 2014) New Revision: 48512 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48512 Log: * 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. Modified files: trunk/test/psych/json/test_stream.rb trunk/test/psych/test_json_tree.rb Index: test/psych/json/test_stream.rb =================================================================== --- test/psych/json/test_stream.rb (revision 48511) +++ test/psych/json/test_stream.rb (revision 48512) @@ -65,7 +65,7 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/json/test_stream.rb#L65 @stream.push list json = @io.string - assert_match(/]$/, json) + assert_match(/\]$/, json) assert_match(/^--- \[/, json) assert_match(/["]one["]/, json) assert_match(/["]two["]/, json) Index: test/psych/test_json_tree.rb =================================================================== --- test/psych/test_json_tree.rb (revision 48511) +++ test/psych/test_json_tree.rb (revision 48512) @@ -45,7 +45,7 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/test_json_tree.rb#L45 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/