зеркало из https://github.com/github/ruby.git
* 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:
Родитель
748beee825
Коммит
b0333388ab
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
Загрузка…
Ссылка в новой задаче