diff options
Diffstat (limited to 'mrbgems/mruby-io/src')
| -rw-r--r-- | mrbgems/mruby-io/src/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mrbgems/mruby-io/src/file.c b/mrbgems/mruby-io/src/file.c index 6c62db662..a19858a63 100644 --- a/mrbgems/mruby-io/src/file.c +++ b/mrbgems/mruby-io/src/file.c @@ -116,14 +116,14 @@ static mrb_value mrb_file_s_unlink(mrb_state *mrb, mrb_value obj) { const mrb_value *argv; - mrb_value pathv; mrb_int argc, i; char *path; mrb_get_args(mrb, "*", &argv, &argc); for (i = 0; i < argc; i++) { const char *utf8_path; - pathv = mrb_ensure_string_type(mrb, argv[i]); + mrb_value pathv = argv[i]; + mrb_ensure_string_type(mrb, pathv); utf8_path = RSTRING_CSTR(mrb, pathv); path = mrb_locale_from_utf8(utf8_path, -1); if (UNLINK(path) < 0) { |
