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

ruby-changes:25150

From: usa <ko1@a...>
Date: Tue, 16 Oct 2012 09:40:48 +0900 (JST)
Subject: [ruby-changes:25150] usa:r37202 (trunk): * test/ruby/test_regexp.rb

usa	2012-10-16 09:40:26 +0900 (Tue, 16 Oct 2012)

  New Revision: 37202

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

  Log:
    * test/ruby/test_regexp.rb
      (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): use
      Regexp.new instead of literal to ignore a parser warning.

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_regexp.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37201)
+++ ChangeLog	(revision 37202)
@@ -1,3 +1,9 @@
+Tue Oct 16 09:40:04 2012  NAKAMURA Usaku  <usa@r...>
+
+	* test/ruby/test_regexp.rb
+	  (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): use
+	  Regexp.new instead of literal to ignore a parser warning.
+
 Tue Oct 16 09:30:30 2012  NAKAMURA Usaku  <usa@r...>
 
 	* test/ruby/test_regexp.rb
Index: test/ruby/test_regexp.rb
===================================================================
--- test/ruby/test_regexp.rb	(revision 37201)
+++ test/ruby/test_regexp.rb	(revision 37202)
@@ -914,6 +914,7 @@
 
   def test_raw_hyphen_and_tk_char_type_after_range
     bug6853 = '[ruby-core:47115]'
-    check(/[0-1-\s]/, [' ', '-'], ['2', 'a'], bug6853)
+    # use Regexp.new instead of literal to ignore a parser warning.
+    check(Regexp.new('[0-1-\\s]'), [' ', '-'], ['2', 'a'], bug6853)
   end
 end

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

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