summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-05-18 05:57:46 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-05-18 05:57:46 +0000
commitc0e5ea941820076461beabe6c8342b8a47484319 (patch)
treebeeb3efa69c6cfebc596ea43875222f25483b726 /eval.c
parent32dc42cf1a248821df7594047bd3fd7822622b32 (diff)
1.1b9_21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/eval.c b/eval.c
index 84176dde61..a0a1ba5767 100644
--- a/eval.c
+++ b/eval.c
@@ -508,14 +508,12 @@ dyna_var_asgn(id, value)
{
struct RVarmap *vars = the_dyna_vars;
- if (id) {
- while (vars) {
- if (vars->id == id) {
- vars->val = value;
- return value;
- }
- vars = vars->next;
+ while (vars) {
+ if (vars->id == id) {
+ vars->val = value;
+ return value;
}
+ vars = vars->next;
}
new_dvar(id, value);
return value;
@@ -4073,7 +4071,7 @@ f_load(obj, fname)
Check_SafeStr(fname);
#ifndef __MACOS__
if (RSTRING(fname)->ptr[0] == '~') {
- fname = file_s_expand_path(0, fname);
+ fname = file_s_expand_path(1, &fname);
}
#endif
file = find_file(RSTRING(fname)->ptr);