Merge pull request #3885 from Shokuji/cygwin_mruby_io_test

fixed mruby-io so that the test passes on cygwin
This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-12-12 22:34:10 +09:00
committed by GitHub
+1
View File
@@ -200,6 +200,7 @@ mrb_file_basename(mrb_state *mrb, mrb_value klass)
if ((bname = basename(path)) == NULL) {
mrb_sys_fail(mrb, "basename");
}
if (strncmp(bname, "//", 3) == 0) bname[1] = '\0'; /* patch for Cygwin */
return mrb_str_new_cstr(mrb, bname);
#endif
}