module-cluster 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -9,8 +9,10 @@ module ModuleCluster
|
|
9
9
|
inclusion_array = Array.new
|
10
10
|
extension_array = Array.new
|
11
11
|
returned_includes, returned_extends = block.call( inclusion_array, extension_array )
|
12
|
-
|
13
|
-
|
12
|
+
if returned_includes and returned_extends and returned_includes.is_a?( Array ) and returned_extends.is_a?( Array )
|
13
|
+
inclusion_array = returned_includes
|
14
|
+
extension_array = returned_extends
|
15
|
+
end
|
14
16
|
unless inclusion_array.is_a?( Array ) and extension_array.is_a?( Array )
|
15
17
|
raise 'Expected module inclusion/extension variables to remain Array. Received ' +
|
16
18
|
inclusion_array.inspect + ' for inclusion array, and ' + extension_array.inspect +
|
data/spec/ModuleCluster_spec.rb
CHANGED
@@ -271,6 +271,7 @@ describe ModuleCluster do
|
|
271
271
|
module ModuleCluster::MockClusterExtension03a
|
272
272
|
ancestors.include?( ModuleCluster::MockClusterExtension03::Mock1 ).should == false
|
273
273
|
ancestors.include?( ModuleCluster::MockClusterExtension03::Mock2 ).should == false
|
274
|
+
ancestors.include?( ModuleCluster::MockClusterExtension03::Mock3 ).should == false
|
274
275
|
extend ModuleCluster::MockClusterExtension03
|
275
276
|
ancestors.include?( ModuleCluster::MockClusterExtension03::Mock1 ).should == false
|
276
277
|
ancestors.include?( ModuleCluster::MockClusterExtension03::Mock2 ).should == false
|