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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## HEAD (unreleased)

- Fix double output bug (https://github.com/zombocom/dead_end/pull/99)
- Fix bug causing poor results (fix #95, fix #88) ()
- [Breaking] Remove previously deprecated `require "dead_end/fyi"` interface (https://github.com/zombocom/dead_end/pull/94)
- DeadEnd is now fired on EVERY syntax error (https://github.com/zombocom/dead_end/pull/94)
Expand Down
20 changes: 0 additions & 20 deletions lib/dead_end/auto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,3 @@ def require_relative(file)
DeadEnd.handle_error(e)
end
end

# I honestly have no idea why this Object delegation is needed
# I keep staring at bootsnap and it doesn't have to do this
# is there a bug in their implementation they haven't caught or
# am I doing something different?
class Object
private

def load(path, wrap = false)
Kernel.load(path, wrap)
rescue SyntaxError => e
DeadEnd.handle_error(e)
end

def require(path)
Kernel.require(path)
rescue SyntaxError => e
DeadEnd.handle_error(e)
end
end
4 changes: 2 additions & 2 deletions spec/integration/ruby_command_line_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ module DeadEnd

require_rb = tmpdir.join("require.rb")
require_rb.write <<~EOM
require_relative "./script.rb"
load "#{script.expand_path}"
EOM

out = `ruby -I#{lib_dir} -rdead_end #{require_rb} 2>&1`

expect($?.success?).to be_falsey
expect(out).to include('❯ 5 it "flerg"')
expect(out).to include('❯ 5 it "flerg"').once
end
end
end
Expand Down