Skip to content

Commit

Permalink
Workaround a rubocop bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tas50 committed Sep 9, 2015
1 parent f3d956d commit e0673c0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libraries/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def method_missing(name, *args, &block)
Chef::Log.debug "Trying to load heartbeat resource #{resource_name} for #{name}"
resource = super(resource_name.to_sym, args.first || name, &block)
break
# rubocop:disable Lint/UselessAssignment
rescue NameError => e
# Works on any MRI ruby
if e.name == resource_name.to_sym || e.inspect =~ /\b#{resource_name}\b/
Expand Down

0 comments on commit e0673c0

Please sign in to comment.