ruby-changes:47231
From: nobu <ko1@a...>
Date: Mon, 17 Jul 2017 00:28:56 +0900 (JST)
Subject: [ruby-changes:47231] nobu:r59346 (trunk): assertions.rb: frozen string buffer
nobu 2017-07-17 00:28:50 +0900 (Mon, 17 Jul 2017) New Revision: 59346 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59346 Log: assertions.rb: frozen string buffer * test/lib/test/unit/assertions.rb (assert_pattern_list): make frozen string literals modifiable as buffers. Modified files: trunk/test/lib/test/unit/assertions.rb Index: test/lib/test/unit/assertions.rb =================================================================== --- test/lib/test/unit/assertions.rb (revision 59345) +++ test/lib/test/unit/assertions.rb (revision 59346) @@ -781,13 +781,13 @@ eom https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit/assertions.rb#L781 msg = message(msg) { expect_msg = "Expected #{mu_pp pattern}\n" if /\n[^\n]/ =~ rest - actual_mesg = "to match\n" + actual_mesg = +"to match\n" rest.scan(/.*\n+/) { actual_mesg << ' ' << $&.inspect << "+\n" } actual_mesg.sub!(/\+\n\z/, '') else - actual_mesg = "to match #{mu_pp rest}" + actual_mesg = "to match " + mu_pp(rest) end actual_mesg << "\nafter #{i} patterns with #{actual.length - rest.length} characters" expect_msg + actual_mesg -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/