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

ruby-changes:40325

From: nobu <ko1@a...>
Date: Sat, 31 Oct 2015 14:19:47 +0900 (JST)
Subject: [ruby-changes:40325] nobu:r52406 (trunk): test_super.rb: test_missing_super

nobu	2015-10-31 14:19:36 +0900 (Sat, 31 Oct 2015)

  New Revision: 52406

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

  Log:
    test_super.rb: test_missing_super
    
    * test/ruby/test_super.rb (test_missing_super): test for the
      simple case super method is not found.

  Modified files:
    trunk/test/ruby/test_super.rb
Index: test/ruby/test_super.rb
===================================================================
--- test/ruby/test_super.rb	(revision 52405)
+++ test/ruby/test_super.rb	(revision 52406)
@@ -403,6 +403,13 @@ class TestSuper < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_super.rb#L403
     assert_equal([1, 2, 3, false, 5], y.foo(1, 2, 3, false, 5))
   end
 
+  def test_missing_super
+    o = Class.new {def foo; super; end}.new
+    e = assert_raise(NoMethodError) {o.foo}
+    assert_same(o, e.receiver)
+    assert_equal(:foo, e.name)
+  end
+
   def test_missing_super_in_method_module
     bug9315 = '[ruby-core:59358] [Bug #9315]'
     a = Module.new do

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

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