From 8d778d9860792d9af81d97db25d9f8000327bee9 Mon Sep 17 00:00:00 2001 From: skandhas Date: Thu, 25 Apr 2013 11:17:34 +0800 Subject: fix Module#ancestors and update test --- test/t/module.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/t/module.rb b/test/t/module.rb index 23dacb44d..41ee8d8df 100644 --- a/test/t/module.rb +++ b/test/t/module.rb @@ -14,8 +14,12 @@ end # TODO not implemented ATM assert('Module.nesting', '15.2.2.3.2') do assert('Module#ancestors', '15.2.2.4.9') do + class Test4ModuleAncestors + end + sc = Test4ModuleAncestors.singleton_class r = String.ancestors - r.class == Array and r.include?(String) and r.include?(Object) + r.class == Array and r.include?(String) and r.include?(Object) and + ! sc.ancestors.include?(sc) end assert('Module#append_features', '15.2.2.4.10') do -- cgit v1.2.3