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

ruby-changes:35859

From: akr <ko1@a...>
Date: Wed, 15 Oct 2014 19:57:26 +0900 (JST)
Subject: [ruby-changes:35859] akr:r47941 (trunk): Simplify a regexp.

akr	2014-10-15 19:57:17 +0900 (Wed, 15 Oct 2014)

  New Revision: 47941

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

  Log:
    Simplify a regexp.

  Modified files:
    trunk/test/ruby/test_rubyoptions.rb
Index: test/ruby/test_rubyoptions.rb
===================================================================
--- test/ruby/test_rubyoptions.rb	(revision 47940)
+++ test/ruby/test_rubyoptions.rb	(revision 47941)
@@ -506,10 +506,10 @@ class TestRubyOptions < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L506
   module SEGVTest
     opts = {}
     if /mswin|mingw/ =~ RUBY_PLATFORM
-      additional = '[\s\w\.\']*'
+      additional = /[\s\w\.\']*/
     else
       opts[:rlimit_core] = 0
-      additional = ""
+      additional = nil
     end
     ExecOptions = opts.freeze
 
@@ -546,9 +546,9 @@ class TestRubyOptions < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L546
         (?:.*\n)?
         For\sdetails:\shttp:\/\/.*\.ruby-lang\.org/.*\n
         \n
-        (?:#{additional})
-      )x
+      )x,
     ]
+    ExpectedStderrList << additional if additional
   end
 
   def assert_segv(args, message=nil)

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

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