Skip to content

Commit

Permalink
Fix warning: __FILE__ in eval may not return location in binding
Browse files Browse the repository at this point in the history
  • Loading branch information
yuuu committed Apr 13, 2020
1 parent d0afd13 commit 5284c99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/better_errors/raised_exception.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def setup_backtrace

def setup_backtrace_from_bindings
@backtrace = exception.__better_errors_bindings_stack.map { |binding|
file = binding.eval "__FILE__"
line = binding.eval "__LINE__"
file = binding.source_location[0]
line = binding.source_location[1]
name = binding.frame_description
StackFrame.new(file, line, name, binding)
}
Expand Down

0 comments on commit 5284c99

Please sign in to comment.