Skip to content

Commit

Permalink
Fix cask loading behavior. Refs Homebrew#5769
Browse files Browse the repository at this point in the history
  • Loading branch information
federicobond committed Aug 15, 2014
1 parent b58f2b2 commit 950bc05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cask/source/path_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def load

# simulate "require"
begin
Cask.const_get(cask_class_name)
Object.const_get(cask_class_name)
rescue NameError
eval(cask_string, TOPLEVEL_BINDING)
end
Expand All @@ -61,7 +61,7 @@ def load
raise e
end
begin
Cask.const_get(cask_class_name).new
Object.const_get(cask_class_name).new
rescue CaskError, StandardError, ScriptError => e
# bug: e.message.concat doesn't work with CaskError exceptions
e.message.concat(" while instantiating '#{cask_class_name}' from '#{path}'")
Expand Down

0 comments on commit 950bc05

Please sign in to comment.