Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

This backports require_relative to Ruby 1.8.

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rvmrc
Octocat-spinner-32 Gemfile
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 require_relative.gemspec
README.md

require_relative

In Ruby 1.9.2, "." was removed from the $LOAD_PATH. require_relative was added to let you require files relative to your current directory.

This gem backports both of these features to earlier Rubies.

Usage

require 'rubygems'
require 'require_relative'

require 'foo' #=> LoadError
require_relative 'foo' #=> works!
Something went wrong with that request. Please try again.