Skip to content

Instantly share code, notes, and snippets.

@workmad3
Created August 26, 2010 13:47
Show Gist options
  • Select an option

  • Save workmad3/551404 to your computer and use it in GitHub Desktop.

Select an option

Save workmad3/551404 to your computer and use it in GitHub Desktop.
unless Kernel.methods.include?(:require_relative)
puts "Patching in require_relative"
def require_relative(*args)
$: << File.dirname(__FILE__) unless $:.include?(File.dirname(__FILE__))
require(*args)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment