summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-29 02:10:22 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-29 02:10:22 +0000
commit27351b924a7fc0aa47da3e19f01468904c32dbe2 (patch)
tree25e0bc63e15ac1d40e231be94d343bf42dea3751 /eval.c
parentbbd798caa2e148e0ebd10b6a6f9aeaf1301a54d0 (diff)
downloadruby-27351b924a7fc0aa47da3e19f01468904c32dbe2.tar.gz
ruby-27351b924a7fc0aa47da3e19f01468904c32dbe2.tar.xz
ruby-27351b924a7fc0aa47da3e19f01468904c32dbe2.zip
see ChangeLog.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index 8220274a0..9edf9aeb3 100644
--- a/eval.c
+++ b/eval.c
@@ -4970,8 +4970,11 @@ rb_f_require(obj, fname)
strcpy(ext, DLEXT);
file = feature = buf;
}
+ file = rb_find_file(file);
+ if (file) goto load_dyna;
#ifdef DLEXT2
- else if (strcmp(ext, DLEXT2) != 0) {
+ file = feature = RSTRING(fname)->ptr;
+ if (strcmp(ext, DLEXT2) != 0) {
buf = ALLOCA_N(char, strlen(file)+sizeof(DLEXT2)+4);
strcpy(buf, feature);
ext = strrchr(buf, '.');
@@ -4980,15 +4983,22 @@ rb_f_require(obj, fname)
strcpy(ext, DLEXT2);
file = feature = buf;
}
-#endif
file = rb_find_file(file);
if (file) goto load_dyna;
+#endif
}
else if (strcmp(DLEXT, ext) == 0) {
feature = RSTRING(fname)->ptr;
file = rb_find_file(feature);
if (file) goto load_dyna;
}
+#ifdef DLEXT2
+ else if (strcmp(DLEXT2, ext) == 0) {
+ feature = RSTRING(fname)->ptr;
+ file = rb_find_file(feature);
+ if (file) goto load_dyna;
+ }
+#endif
}
buf = ALLOCA_N(char, strlen(RSTRING(fname)->ptr) + 5);
strcpy(buf, RSTRING(fname)->ptr);