diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-09-19 21:51:53 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-09-19 22:01:59 +0900 |
| commit | e207d5af43e9d6e09679e9aee9bf00a843528e0e (patch) | |
| tree | 7f83038d199fc076b316d51654819ef6bad5fa78 /mrbgems/mruby-io/src | |
| parent | c09d250ca148c0efc0167d55885bd20da87b43f7 (diff) | |
| download | mruby-e207d5af43e9d6e09679e9aee9bf00a843528e0e.tar.gz mruby-e207d5af43e9d6e09679e9aee9bf00a843528e0e.zip | |
Remove implicit conversion using `to_str` method.
We have added internal convenience method `__to_str` which
does string type check.
Diffstat (limited to 'mrbgems/mruby-io/src')
| -rw-r--r-- | mrbgems/mruby-io/src/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-io/src/file.c b/mrbgems/mruby-io/src/file.c index e65741061..960f4a4e2 100644 --- a/mrbgems/mruby-io/src/file.c +++ b/mrbgems/mruby-io/src/file.c @@ -115,7 +115,7 @@ mrb_file_s_unlink(mrb_state *mrb, mrb_value obj) mrb_get_args(mrb, "*", &argv, &argc); for (i = 0; i < argc; i++) { const char *utf8_path; - pathv = mrb_convert_type(mrb, argv[i], MRB_TT_STRING, "String", "to_str"); + pathv = mrb_string_type(mrb, argv[i]); utf8_path = mrb_string_value_cstr(mrb, &pathv); path = mrb_locale_from_utf8(utf8_path, -1); if (UNLINK(path) < 0) { |
