diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-25 02:07:13 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-25 02:07:13 +0000 |
commit | d0830a222c261922cb73e340ae32bf6f32f6845e (patch) | |
tree | 7448edeccf2b73b12a60df2cda2346b5def0abad /load.c | |
parent | 91c6ba23336789f340878f69b5fee1defe0fa5d5 (diff) | |
download | ruby-d0830a222c261922cb73e340ae32bf6f32f6845e.tar.gz |
Document require_relative
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'load.c')
-rw-r--r-- | load.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -453,7 +453,15 @@ rb_f_require(VALUE obj, VALUE fname) return rb_require_safe(fname, rb_safe_level()); } -VALUE +/* + * call-seq: + * require_relative(string) -> true or false + * + * Ruby tries to load the library named _string_ relative to the requiring + * file's path. If the file's path cannot be determined a LoadError is raised. + * If a file is loaded +true+ is returned and false otherwise. + */ + rb_f_require_relative(VALUE obj, VALUE fname) { VALUE rb_current_realfilepath(void); |