summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-12 09:07:57 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-12 09:07:57 +0000
commitdce6fa05661b0002f5ef38292b3a839113b80346 (patch)
tree060ec81a34e5024a8b70372f4130de878eb87002 /eval.c
parent2e71826ac4c6033716fd502fb45161ea953b26bd (diff)
2000-05-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/eval.c b/eval.c
index 504a31c062..42a38b6417 100644
--- a/eval.c
+++ b/eval.c
@@ -4896,9 +4896,8 @@ rb_f_require(obj, fname)
buf = ALLOCA_N(char, strlen(RSTRING(fname)->ptr) + 5);
strcpy(buf, RSTRING(fname)->ptr);
strcat(buf, ".rb");
- file = find_file(buf);
- if (file) {
- fname = rb_str_new2(file);
+ if (find_file(buf)) {
+ fname = rb_str_new2(buf);
feature = buf;
goto load_rb;
}