diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-04-10 06:09:00 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-04-10 06:09:00 +0000 |
commit | 1c907a93001b65cebfb5229dea11ce60289fd14e (patch) | |
tree | 05852fad6a378aa3c04243244f793964ccb42d7f /io.c | |
parent | 3a0384f498d4568f1a1f200633852d9fa9f8b382 (diff) |
* io.c (opt_i_set): should strdup() inplace_edit string.
* eval.c (exec_under): need to push cref too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -3324,11 +3324,12 @@ static void opt_i_set(val) VALUE val; { + if (ruby_inplace_mode) free(ruby_inplace_mode); if (!RTEST(val)) { ruby_inplace_mode = 0; return; } - ruby_inplace_mode = STR2CSTR(val); + ruby_inplace_mode = strdup(STR2CSTR(val)); } void |