./devel/ruby-rbx-require-relative, Ruby 1.9s require_relative for Rubinius and MRI 1.8

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: pkgsrc-2013Q4, Version: 0.0.9, Package name: ruby193-rbx-require-relative-0.0.9, Maintainer: pkgsrc-users

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.


Required to run:
[lang/ruby193-base]

Master sites: (Expand)

SHA1: 21d4bf26ea768cdc02f8323d97fac74599390b9a
RMD160: d04ffc4e251ef04a7bf0f67aaa69b400b15daaad
Filesize: 8.5 KB

Version history: (Expand)