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

ruby-changes:41571

From: nobu <ko1@a...>
Date: Sun, 24 Jan 2016 23:58:28 +0900 (JST)
Subject: [ruby-changes:41571] nobu:r53645 (trunk): test_class.rb: test_namescope_error_message

nobu	2016-01-24 23:59:16 +0900 (Sun, 24 Jan 2016)

  New Revision: 53645

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

  Log:
    test_class.rb: test_namescope_error_message
    
    * test/ruby/test_class.rb (test_namescope_error_message): test for
      r53644.

  Modified files:
    trunk/test/ruby/test_class.rb
Index: test/ruby/test_class.rb
===================================================================
--- test/ruby/test_class.rb	(revision 53644)
+++ test/ruby/test_class.rb	(revision 53645)
@@ -537,6 +537,14 @@ class TestClass < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_class.rb#L537
     }
   end
 
+  def test_namescope_error_message
+    m = Module.new
+    o = m.module_eval "class A\u{3042}; self; end.new"
+    assert_raise_with_message(TypeError, /A\u{3042}/) {
+      o::Foo
+    }
+  end
+
   def test_redefinition_mismatch
     m = Module.new
     m.module_eval "A = 1"

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

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