Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

require_relative and require with relative file don't work #5

Closed
henrik opened this Issue Apr 22, 2012 · 0 comments

Comments

Projects
None yet
1 participant
Owner

henrik commented Apr 22, 2012

As reported by Yakiv Kramarenko.

The best fix I can think of is injecting something like:

$:.unshift Dir.pwd
module Kernel
  def require_relative(file)
    require(file)
  end
end

Or perhaps shorter:

$:.unshift Dir.pwd
Kernel.class_eval { alias_method :require_relative, :require }

Based on this.

@henrik henrik closed this in 5b58694 Apr 22, 2012

@henrik henrik added a commit that referenced this issue Apr 22, 2012

@henrik henrik Oops, missing semicolon. Refs #5. 152e583
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment