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

ruby-changes:26596

From: nobu <ko1@a...>
Date: Sat, 29 Dec 2012 10:14:09 +0900 (JST)
Subject: [ruby-changes:26596] nobu:r38647 (trunk): * test/ruby/test_class.rb (test_cannot_reinitialize_class_with_initialize_copy),

nobu	2012-12-29 10:13:53 +0900 (Sat, 29 Dec 2012)

  New Revision: 38647

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

  Log:
    * test/ruby/test_class.rb (test_cannot_reinitialize_class_with_initialize_copy),
      (test_invalid_superclass): get rid of confusing ruby-mode.el.

  Modified files:
    trunk/test/ruby/test_class.rb

Index: test/ruby/test_class.rb
===================================================================
--- test/ruby/test_class.rb	(revision 38646)
+++ test/ruby/test_class.rb	(revision 38647)
@@ -272,7 +272,7 @@ class TestClass < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_class.rb#L272
   end
 
   def test_cannot_reinitialize_class_with_initialize_copy # [ruby-core:50869]
-    assert_in_out_err([], <<-RUBY, ["Object"], [])
+    assert_in_out_err([], <<-'end;', ["Object"], [])
       class Class
         def initialize_copy(*); super; end
       end
@@ -283,7 +283,7 @@ class TestClass < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_class.rb#L283
       A.send(:initialize_copy, Class.new(B)) rescue nil
 
       p A.superclass
-    RUBY
+    end;
   end
 
   module M
@@ -302,38 +302,38 @@ class TestClass < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_class.rb#L302
 
   def test_invalid_superclass
     assert_raise(TypeError) do
-      eval <<-EOF
+      eval <<-'end;'
         class C < nil
         end
-      EOF
+      end;
     end
 
     assert_raise(TypeError) do
-      eval <<-EOF
+      eval <<-'end;'
         class C < false
         end
-      EOF
+      end;
     end
 
     assert_raise(TypeError) do
-      eval <<-EOF
+      eval <<-'end;'
         class C < true
         end
-      EOF
+      end;
     end
 
     assert_raise(TypeError) do
-      eval <<-EOF
+      eval <<-'end;'
         class C < 0
         end
-      EOF
+      end;
     end
 
     assert_raise(TypeError) do
-      eval <<-EOF
+      eval <<-'end;'
         class C < ""
         end
-      EOF
+      end;
     end
   end
 end

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

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