Skip to content

Commit

Permalink
Fix NoMethodError undefined method call for Hash
Browse files Browse the repository at this point in the history
Enumerable#find expects a callable object for its `ifnone` parameter.
  • Loading branch information
ur5us authored Dec 20, 2017
1 parent b32cf0b commit 95f9f7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cap-ec2/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def stages_tag
end

def tag_value(instance, key)
instance.tags.find({}) { |t| t[:key] == key.to_s }[:value]
instance.tags.find(-> { {} }) { |t| t[:key] == key.to_s }[:value]
end

def self.contact_point_mapping
Expand Down

0 comments on commit 95f9f7b

Please sign in to comment.