Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

By providing the binding and filename, if an exception is thrown with…

…in eval, it will show the proper backtrace rather than saying it just originated within eval()
  • Loading branch information...
commit afb9f27439676948bea9cf2f455c5a3a35bd1b13 1 parent ecd43f8
@mikelewis mikelewis authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/goliath/server.rb
View
3  lib/goliath/server.rb
@@ -114,7 +114,8 @@ def load_config(file = nil)
file ||= "#{config_dir}/#{api_name}.rb"
return unless File.exists?(file)
- eval(IO.read(file))
+ proc = Proc.new {} # create proc to grab binding
+ eval(IO.read(file), proc.binding, file)
end
# Retrieves the configuration directory for the server
Please sign in to comment.
Something went wrong with that request. Please try again.