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

ruby-changes:15510

From: nobu <ko1@a...>
Date: Tue, 20 Apr 2010 10:47:01 +0900 (JST)
Subject: [ruby-changes:15510] Ruby:r27412 (trunk): * test/ruby: make more ruby-mode.el friendly.

nobu	2010-04-20 10:46:52 +0900 (Tue, 20 Apr 2010)

  New Revision: 27412

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

  Log:
    * test/ruby: make more ruby-mode.el friendly.

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

Index: test/ruby/test_regexp.rb
===================================================================
--- test/ruby/test_regexp.rb	(revision 27411)
+++ test/ruby/test_regexp.rb	(revision 27412)
@@ -145,7 +145,7 @@
     assert_equal('//', //.inspect)
     assert_equal('//i', //i.inspect)
     assert_equal('/\//i', /\//i.inspect)
-    assert_equal('/\//i', /#{'/'}/i.inspect)
+    assert_equal('/\//i', %r"#{'/'}"i.inspect)
     assert_equal('/\/x/i', /\/x/i.inspect)
     assert_equal('/\x00/i', /#{"\0"}/i.inspect)
     assert_equal("/\n/i", /#{"\n"}/i.inspect)
@@ -477,7 +477,7 @@
     end.value
     assert(m.tainted?)
     assert_nothing_raised('[ruby-core:26137]') {
-      m = proc {$SAFE = 4; /#{}/o}.call
+      m = proc {$SAFE = 4; %r"#{}"o}.call
     }
     assert(m.tainted?)
   end
@@ -496,7 +496,7 @@
   end
 
   def failcheck(re)
-    assert_raise(RegexpError) { /#{ re }/ }
+    assert_raise(RegexpError) { %r"#{ re }" }
   end
 
   def test_parse
Index: test/ruby/test_parse.rb
===================================================================
--- test/ruby/test_parse.rb	(revision 27411)
+++ test/ruby/test_parse.rb	(revision 27412)
@@ -517,8 +517,8 @@
     x = nil
 
     assert_raise(SyntaxError) do
-      eval %q(
-<<FOO
+      eval %Q(
+<\<FOO
       )
     end
 
@@ -531,8 +531,8 @@
     end
 
     assert_raise(SyntaxError) do
-      eval %q(
-<<"
+      eval %Q(
+<\<\"
       )
     end
 
@@ -558,7 +558,7 @@
     end
 
     assert_nothing_raised do
-      eval "x = <<FOO\r\n1\r\nFOO"
+      eval "x = <<""FOO\r\n1\r\nFOO"
     end
     assert_equal("1\n", x)
   end

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

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