1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/require_relative.rb: new file.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-02-15 06:29:32 +00:00
parent 748beee825
commit b0333388ab
2 changed files with 10 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Fri Feb 15 15:29:03 2008 Tanaka Akira <akr@fsij.org>
* lib/require_relative.rb: new file.
Fri Feb 15 15:23:12 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/iconv/iconv.c (iconv_convert): check upper bound. a patch from

6
lib/require_relative.rb Normal file
View file

@ -0,0 +1,6 @@
def require_relative(relative_feature)
/:/ =~ caller.first
absolute_feature = File.expand_path(File.join(File.dirname($`), relative_feature))
require absolute_feature
end