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

ruby-changes:36077

From: ko1 <ko1@a...>
Date: Mon, 27 Oct 2014 16:29:48 +0900 (JST)
Subject: [ruby-changes:36077] ko1:r48158 (trunk): * test/ruby/test_super.rb: add a test to check block passing.

ko1	2014-10-27 16:29:32 +0900 (Mon, 27 Oct 2014)

  New Revision: 48158

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

  Log:
    * test/ruby/test_super.rb: add a test to check block passing.

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_super.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48157)
+++ ChangeLog	(revision 48158)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Oct 27 16:26:37 2014  Koichi Sasada  <ko1@a...>
+
+	* test/ruby/test_super.rb: add a test to check block passing.
+
 Mon Oct 27 15:59:26 2014  Koichi Sasada  <ko1@a...>
 
 	* gc.c: is_incremental_marking(), will_be_incremental_marking():
Index: test/ruby/test_super.rb
===================================================================
--- test/ruby/test_super.rb	(revision 48157)
+++ test/ruby/test_super.rb	(revision 48158)
@@ -508,4 +508,22 @@ class TestSuper < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_super.rb#L508
     end
     assert_equal("A", b.new.foo, bug10263)
   end
+
+  def test_super_with_block
+    a = Class.new do
+      def foo
+        yield
+      end
+    end
+
+    b = Class.new(a) do
+      def foo
+        super{
+          "b"
+        }
+      end
+    end
+
+    assert_equal "b", b.new.foo{"c"}
+  end
 end

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

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