Created
April 30, 2014 21:03
-
-
Save bluSch/bb053929ce1c06be3ff4 to your computer and use it in GitHub Desktop.
add require_relative to ruby 1.8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unless Kernel.respond_to?(:require_relative) | |
module Kernel | |
def require_relative(path) | |
require File.join(File.dirname(caller[0]), path.to_str) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment