Path to this page:
./
devel/ruby-rbx-require-relative,
Ruby 1.9s require_relative for Rubinius and MRI 1.8
Branch: pkgsrc-2013Q3,
Version: 0.0.9,
Package name: ruby193-rbx-require-relative-0.0.9,
Maintainer: pkgsrc-usersRuby 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.
Master sites: (Expand)
SHA1: 21d4bf26ea768cdc02f8323d97fac74599390b9a
RMD160: d04ffc4e251ef04a7bf0f67aaa69b400b15daaad
Filesize: 8.5 KB
Version history: (Expand)
- (2013-10-04) Package added to pkgsrc.se, version ruby193-rbx-require-relative-0.0.9 (created)