Ruby's require_relativeconverts paths to absolute paths before
calling require. This conversion effectively means that you can pass
an absolute path to require_relative and have it load the file
correctly, as if it were a relative path.
This is an idiosyncrasy of Ruby that doesn't match the semantics of the
method. However, some libraries, like grpc, rely on the
idiosyncrasy to load files. Because Derailed's implementation doesn't
conform to this idiosyncrasy, it is unable to work when such libraries
exist in a project.
This change makes Derailed's implementation of require_relative behave
more closely to the implementation in Ruby. By making this change, you
can use Derailed with any offending gem.
Ruby's
require_relative
converts paths to absolute paths before callingrequire
. This conversion effectively means that you can pass an absolute path torequire_relative
and have it load the file correctly, as if it were a relative path.This is an idiosyncrasy of Ruby that doesn't match the semantics of the method. However, some libraries, like grpc, rely on the idiosyncrasy to load files. Because Derailed's implementation doesn't conform to this idiosyncrasy, it is unable to work when such libraries exist in a project.
This change makes Derailed's implementation of
require_relative
behave more closely to the implementation in Ruby. By making this change, you can use Derailed with any offending gem.