[前][次][番号順一覧][スレッド一覧]

ruby-changes:35226

From: nobu <ko1@a...>
Date: Thu, 28 Aug 2014 21:01:56 +0900 (JST)
Subject: [ruby-changes:35226] nobu:r47308 (trunk): test_io.rb: non UTF-8 pattern

nobu	2014-08-28 21:01:43 +0900 (Thu, 28 Aug 2014)

  New Revision: 47308

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47308

  Log:
    test_io.rb: non UTF-8 pattern
    
    * test/ruby/test_io.rb: (test_invalid_advise): fix pattern for non
      UTF-8 environment.

  Modified files:
    trunk/test/ruby/test_io.rb
Index: test/ruby/test_io.rb
===================================================================
--- test/ruby/test_io.rb	(revision 47307)
+++ test/ruby/test_io.rb	(revision 47308)
@@ -2479,7 +2479,7 @@ End https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L2479
       %W{Normal rand glark will_need zzzzzzzzzzzz \u2609}.map(&:to_sym).each do |adv|
         [[0,0], [0, 20], [400, 2]].each do |offset, len|
           open(tf.path) do |t|
-            assert_raise_with_message(NotImplementedError, /#{adv.inspect}/, feature4204) { t.advise(adv, offset, len) }
+            assert_raise_with_message(NotImplementedError, /#{Regexp.quote(adv.inspect)}/, feature4204) { t.advise(adv, offset, len) }
           end
         end
       end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]