load_path: trim entries where possible to fix Ruby crashes
This commit is contained in:
parent
ed0985783a
commit
4265540cc4
@ -4,6 +4,9 @@ require "pathname"
|
||||
|
||||
HOMEBREW_LIBRARY_PATH = Pathname(__dir__).realpath.freeze
|
||||
|
||||
$LOAD_PATH.push(HOMEBREW_LIBRARY_PATH.to_s) unless $LOAD_PATH.include?(HOMEBREW_LIBRARY_PATH.to_s)
|
||||
$LOAD_PATH.push HOMEBREW_LIBRARY_PATH.to_s
|
||||
|
||||
require "vendor/bundle/bundler/setup"
|
||||
|
||||
$LOAD_PATH.select! { |d| Pathname(d).directory? }
|
||||
$LOAD_PATH.uniq!
|
||||
|
||||
@ -9,11 +9,6 @@ RSpec::Matchers.define_negated_matcher :be_a_failure, :be_a_success
|
||||
RSpec.shared_context "integration test" do
|
||||
extend RSpec::Matchers::DSL
|
||||
|
||||
if OS.mac? &&
|
||||
!RUBY_BIN.to_s.match?(%r{^/(System/Library/Frameworks/Ruby\.framework/Versions/(Current|\d+\.\d+)/)usr/bin$})
|
||||
skip "integration test requires system Ruby"
|
||||
end
|
||||
|
||||
matcher :be_a_success do
|
||||
match do |actual|
|
||||
status = actual.is_a?(Proc) ? actual.call : actual
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user