Method: Kernel.require_relative

Defined in:
lib/derailed_benchmarks/core_ext/kernel_require.rb

.require_relative(file) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/derailed_benchmarks/core_ext/kernel_require.rb', line 30

def require_relative(file)
  if Pathname.new(file).absolute?
    require file
  else
    require File.expand_path("../#{file}", caller_locations(1, 1)[0].absolute_path)
  end
end