summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-30 04:24:17 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-30 04:24:17 +0000
commitcdc18328b2a81fb83940232ebb2142f8bfd5d7fd (patch)
tree38d706b2e0e8f9e962fb1eb38ed38e3925d4eb2e /eval.c
parent247f5db567f253e750e2ef2c4718a7320a6b9d54 (diff)
2000-05-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 42a38b6417..0cc4d61ccc 100644
--- a/eval.c
+++ b/eval.c
@@ -4688,8 +4688,15 @@ find_file(file)
else {
path = 0;
}
+ file = dln_find_file(file, path);
+ if (file) {
+ FILE *f = fopen(file, "r");
- return dln_find_file(file, path);
+ if (f == NULL) return 0;
+ fclose(f);
+ return file;
+ }
+ return 0;
}
void