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

ruby-changes:24566

From: shugo <ko1@a...>
Date: Sat, 4 Aug 2012 10:04:20 +0900 (JST)
Subject: [ruby-changes:24566] shugo:r36617 (trunk): * test/ruby/test_alias.rb (test_super_in_aliased_module_method):

shugo	2012-08-04 10:04:05 +0900 (Sat, 04 Aug 2012)

  New Revision: 36617

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

  Log:
    * test/ruby/test_alias.rb (test_super_in_aliased_module_method):
      add a test case for [ruby-dev:46028], which fails in 1.8.

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_alias.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 36616)
+++ ChangeLog	(revision 36617)
@@ -1,3 +1,8 @@
+Sat Aug  4 10:02:03 2012  Shugo Maeda  <shugo@r...>
+
+	* test/ruby/test_alias.rb (test_super_in_aliased_module_method):
+	  add a test case for [ruby-dev:46028], which fails in 1.8.
+
 Sat Aug  4 01:56:06 2012  Nobuyoshi Nakada  <nobu@r...>
 
 	* vm_insnhelper.c (vm_search_normal_superclass): no longer needs
Index: test/ruby/test_alias.rb
===================================================================
--- test/ruby/test_alias.rb	(revision 36616)
+++ test/ruby/test_alias.rb	(revision 36617)
@@ -104,4 +104,29 @@
     end
     assert_equal(:ok, d.new.bar)
   end
+
+  module SuperInAliasedModuleMethod
+    module M
+      def foo
+        super << :M
+      end
+
+      alias bar foo
+    end
+
+    class Base
+      def foo
+        [:Base]
+      end
+    end
+
+    class Derived < Base
+      include M
+    end
+  end
+
+  # [ruby-dev:46028]
+  def test_super_in_aliased_module_method # fails in 1.8
+    assert_equal([:Base, :M], SuperInAliasedModuleMethod::Derived.new.bar)
+  end
 end

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

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