summaryrefslogtreecommitdiff
path: root/devel/ruby-rbx-require-relative/DESCR
blob: f7f105ed943c9f6493319353541441caea1c6639 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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.