aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-04-19 14:02:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-04-19 14:02:48 +0000
commite313b6a9f1448bd2255ca12586068ddee6b7c3e0 (patch)
tree5708a398a70c59aae98493dfcb5e3f6573fb83df
parent07eead80713acee91fbca1c0c3bc33b5284eea31 (diff)
downloadruby-e313b6a9f1448bd2255ca12586068ddee6b7c3e0.tar.gz
* eval.c (search_required): deal with features with path too.
* intern.h (rb_file_expand_path): prototype. fixed: [ruby-dev:26082] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--eval.c4
-rw-r--r--intern.h1
3 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3d2a71cadf..dd32477f1a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Apr 19 23:02:40 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * eval.c (search_required): deal with features with path too.
+
+ * intern.h (rb_file_expand_path): prototype. fixed: [ruby-dev:26082]
+
Tue Apr 19 08:38:07 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (search_required, rb_require_safe): expand path in
diff --git a/eval.c b/eval.c
index 73f04ce868..5807aa53b8 100644
--- a/eval.c
+++ b/eval.c
@@ -6916,8 +6916,8 @@ search_required(fname, path)
}
}
}
- else if (!strchr(ftptr, '/')) {
- if (rb_feature_p(ftptr, 0, Qfalse)) return 's';
+ else if (ext = rb_feature_p(ftptr, 0, Qfalse)) {
+ return (*ext && (IS_SOEXT(ext) || IS_DLEXT(ext))) ? 's' : 'r';
}
tmp = fname;
type = rb_find_file_ext(&tmp, loadable_ext);
diff --git a/intern.h b/intern.h
index e215caa00f..221e223b05 100644
--- a/intern.h
+++ b/intern.h
@@ -229,6 +229,7 @@ VALUE rb_exec_recursive _((VALUE(*)(ANYARGS),VALUE,VALUE));
/* file.c */
int eaccess _((const char*, int));
VALUE rb_file_s_expand_path _((int, VALUE *));
+VALUE rb_file_expand_path _((VALUE, VALUE));
void rb_file_const _((const char*, VALUE));
int rb_find_file_ext _((VALUE*, const char* const*));
VALUE rb_find_file _((VALUE));