[前][次][番号順一覧][スレッド一覧][生データ]

yarv-diff:240

From: ko1 atdot.net
Date: 13 Feb 2006 16:32:33 -0000
Subject: [yarv-diff:240] r403 - in trunk: . test/ruby

Author: aamine
Date: 2006-02-14 01:32:33 +0900 (Tue, 14 Feb 2006)
New Revision: 403

Modified:
   trunk/ChangeLog
   trunk/test/ruby/test_module.rb
Log:
* test/ruby/test_module.rb: ignore PP mixins.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-02-13 16:25:14 UTC (rev 402)
+++ trunk/ChangeLog	2006-02-13 16:32:33 UTC (rev 403)
@@ -4,6 +4,11 @@
 #  from Mon, 03 May 2004 01:24:19 +0900
 #
 
+2006-02-14(Tue) 01:32:23 +0900  Minero Aoki  <aamine loveruby.net>
+
+	* test/ruby/test_module.rb: ignore PP mixins.
+
+
 2006-02-14(Tue) 01:24:56 +0900  Minero Aoki  <aamine loveruby.net>
 
 	* test/ruby/test_lambda.rb: removed (->(){...} syntax is

Modified: trunk/test/ruby/test_module.rb
===================================================================
--- trunk/test/ruby/test_module.rb	2006-02-13 16:25:14 UTC (rev 402)
+++ trunk/test/ruby/test_module.rb	2006-02-13 16:32:33 UTC (rev 403)
@@ -1,4 +1,5 @@
 require 'test/unit'
+require 'pp'
 
 $m0 = Module.nesting
 
@@ -34,6 +35,10 @@
 
   # Support stuff
 
+  def remove_pp_mixins(list)
+    list.reject {|c| c == PP::ObjectMixin }
+  end
+
   module Mixin
     MIXIN = 1
     def mixin
@@ -160,11 +165,9 @@
     assert_equal([User, Mixin],      User.ancestors)
     assert_equal([Mixin],            Mixin.ancestors)
 
-    assert_equal([Object, Kernel],   Object.ancestors)
-    assert_equal([String, 
-                   Enumerable, 
-                   Comparable,
-                   Object, Kernel],  String.ancestors)
+    assert_equal([Object, Kernel], remove_pp_mixins(Object.ancestors))
+    assert_equal([String, Enumerable, Comparable, Object, Kernel],
+                 remove_pp_mixins(String.ancestors))
   end
 
   def test_class_eval
@@ -210,8 +213,9 @@
   def test_included_modules
     assert_equal([], Mixin.included_modules)
     assert_equal([Mixin], User.included_modules)
-    assert_equal([Kernel], Object.included_modules)
-    assert_equal([Enumerable, Comparable, Kernel], String.included_modules)
+    assert_equal([Kernel], remove_pp_mixins(Object.included_modules))
+    assert_equal([Enumerable, Comparable, Kernel],
+                 remove_pp_mixins(String.included_modules))
   end
 
   def test_instance_methods


-- 
ML: yarv-diff quickml.atdot.net
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧][生データ]