diff options
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -3461,10 +3461,14 @@ static void opt_i_set(val) VALUE val; { + if (!RTEST(val)) { + if (ruby_inplace_mode) free(ruby_inplace_mode); + ruby_inplace_mode = 0; + return; + } + StringValue(val); if (ruby_inplace_mode) free(ruby_inplace_mode); ruby_inplace_mode = 0; - if (!RTEST(val)) return; - StringValue(val); ruby_inplace_mode = strdup(RSTRING(val)->ptr); } |