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

ruby-changes:25083

From: ko1 <ko1@a...>
Date: Thu, 11 Oct 2012 03:38:11 +0900 (JST)
Subject: [ruby-changes:25083] ko1:r37135 (trunk): * bootstraptest/test_block.rb: add tests for block with super.

ko1	2012-10-11 03:38:01 +0900 (Thu, 11 Oct 2012)

  New Revision: 37135

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

  Log:
    * bootstraptest/test_block.rb: add tests for block with super.

  Modified files:
    trunk/ChangeLog
    trunk/bootstraptest/test_block.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37134)
+++ ChangeLog	(revision 37135)
@@ -1,3 +1,7 @@
+Thu Oct 11 03:37:08 2012  Koichi Sasada  <ko1@a...>
+
+	* bootstraptest/test_block.rb: add tests for block with super.
+
 Thu Oct 11 02:54:07 2012  Koichi Sasada  <ko1@a...>
 
 	* vm_dump.c: fix debug prints to catch up recent changes
Index: bootstraptest/test_block.rb
===================================================================
--- bootstraptest/test_block.rb	(revision 37134)
+++ bootstraptest/test_block.rb	(revision 37135)
@@ -565,3 +565,35 @@
   t.test_for_bug
 }, '[ruby-core:14395]'
 
+assert_equal 'true', %q{
+  class C0
+    def foo
+      block_given?
+    end
+  end
+
+  class C1 < C0
+    def foo
+      super
+    end
+  end
+
+  C1.new.foo{}
+}
+
+assert_equal 'true', %q{
+  class C0
+    def foo
+      block_given?
+    end
+  end
+
+  class C1 < C0
+    def foo
+      super()
+    end
+  end
+
+  C1.new.foo{}
+}
+

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

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