summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--state.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/state.rb b/state.rb
index a15f6b8..94fca64 100644
--- a/state.rb
+++ b/state.rb
@@ -152,6 +152,17 @@ class State
@holds = Set.new [hold]
@hold_params = {}
self.class.hold_provides.each do |x|
+ if x.is_a? Array
+ worked = false
+ x.each do |y|
+ hold.params[y] or next
+ @hold_params[y] = hold.params[y]
+ worked = true
+ end
+ worked or raise AmbiguousRequest, "None of #{x.join(', ')} defined"
+ next
+ end
+
hold.params[x] or raise AmbiguousRequest, "#{x} undefined"
@hold_params[x] = hold.params[x]
end