Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## HEAD (unreleased)

- Fix sinatra support for `require_relative` (https://github.com/zombocom/dead_end/pull/63)

## 1.1.6

- Consider if syntax error caused an unexpected variable instead of end (https://github.com/zombocom/dead_end/pull/58)
Expand Down
2 changes: 1 addition & 1 deletion lib/dead_end/auto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def require_relative(file)
if Pathname.new(file).absolute?
dead_end_original_require file
else
dead_end_original_require File.expand_path("../#{file}", caller_locations(1, 1)[0].absolute_path)
dead_end_original_require File.expand_path("../#{file}", Kernel.caller_locations(1, 1)[0].absolute_path)
end
rescue SyntaxError => e
DeadEnd.handle_error(e)
Expand Down