summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/io.c b/io.c
index 3bcf663aad..ae021f8a4b 100644
--- a/io.c
+++ b/io.c
@@ -3462,10 +3462,8 @@ 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 = 0;
+ if (!RTEST(val)) return;
StringValue(val);
ruby_inplace_mode = strdup(RSTRING(val)->ptr);
}