No commit activity in last 3 years
No release in over 3 years
Ruby 1.9's require_relative for Rubinius and MRI 1.8. We also add abs_path which is like __FILE__ but __FILE__ can be fooled by a sneaky "chdir" while abs_path can't. If you are running on Ruby 1.9 or greater, require_relative is the pre-defined version. The benefit we provide in this situation by this package is the ability to write the same require_relative sequence in Rubinius 1.8 and Ruby 1.9.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Ruby 1.9’s relative_relative for Rubinus and MRI 1.8

Here we add in Module RequireRelative method: require_relative, and abs_file. Example:

require 'rubygems'; require 'require_relative'
require_relative './lib/foo' 
absolute_path = RequireRelative.abs_file

But why abs_file? Well, recall that __FILE__ does not give an absolute path. So if you have chdir’d before using __FILE__, you might not be able to retrieve the full path.

The latest version is at http://github.com/rocky/rbx-require-relative/