Permalink
Browse files

Allow accurate file-line error reporting.

If an exception occurs in config/warble.rb, it would report the error at
the eval line.
  • Loading branch information...
1 parent e5e41e8 commit 77af75b9cffba64fe6267721529691f8bf9734b3 @zimbatm zimbatm committed with BanzaiMan Mar 24, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/warbler/task.rb
View
@@ -43,7 +43,7 @@ class Task < Rake::TaskLib
def initialize(name = nil, config = nil)
@config = config
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
@config ||= Config.new
unless @config.kind_of? Config

0 comments on commit 77af75b

Please sign in to comment.