summaryrefslogtreecommitdiff
path: root/lib/chef/mixin/params_validate.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/mixin/params_validate.rb')
-rw-r--r--lib/chef/mixin/params_validate.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/mixin/params_validate.rb b/lib/chef/mixin/params_validate.rb
index 741e932006..2f6e432024 100644
--- a/lib/chef/mixin/params_validate.rb
+++ b/lib/chef/mixin/params_validate.rb
@@ -155,7 +155,7 @@ class Chef
def _pv_respond_to(opts, key, method_name_list)
value = _pv_opts_lookup(opts, key)
if value != nil
- method_name_list.to_a.each do |method_name|
+ [ method_name_list ].flatten.each do |method_name|
unless value.respond_to?(method_name)
raise ArgumentError, "Option #{key} must have a #{method_name} method!"
end