Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

check that 'other' has a map function before trying to use it

  • Loading branch information...
commit 9289c57c9ebcc17dc72f4b73fe927da02d0e601b 1 parent a9d4a71
@aabes authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 chef/lib/chef/run_list.rb
View
7 chef/lib/chef/run_list.rb
@@ -72,13 +72,14 @@ def ==(other)
if other.kind_of?(Chef::RunList)
other.run_list_items == @run_list_items
else
- return false unless other.respond_to?(:size) && (other.size == @run_list_items.size)
if other.kind_of?(String)
other_run_list_items = [ coerce_to_run_list_item(other) ]
- else
+ else
other_run_list_items = other.dup
end
-
+ return false unless other.respond_to?(:size) && (other.size == @run_list_items.size)
+ return false unless other.respond_to?(:map!)
+
other_run_list_items.map! { |item| coerce_to_run_list_item(item) }
other_run_list_items == @run_list_items
end
Please sign in to comment.
Something went wrong with that request. Please try again.