Skip to content

Commit

Permalink
Allow accurate file-line error reporting.
Browse files Browse the repository at this point in the history
If an exception occurs in config/warble.rb, it would report the error at
the eval line.
  • Loading branch information
Jonas Pfenniger authored and BanzaiMan committed Feb 1, 2013
1 parent e5e41e8 commit 77af75b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/warbler/task.rb
Expand Up @@ -43,7 +43,7 @@ class Task < Rake::TaskLib
def initialize(name = nil, config = nil) def initialize(name = nil, config = nil)
@config = config @config = config
if @config.nil? && File.exists?(Config::FILE) if @config.nil? && File.exists?(Config::FILE)
@config = eval(File.open(Config::FILE) {|f| f.read}) @config = eval(File.read(Config::FILE), binding, Config::FILE, 0)
end end
@config ||= Config.new @config ||= Config.new
unless @config.kind_of? Config unless @config.kind_of? Config
Expand Down

0 comments on commit 77af75b

Please sign in to comment.