Index: file.c =================================================================== --- file.c (revision 42491) +++ file.c (working copy) @@ -3848,7 +3848,7 @@ p = root; } if (p == name) - return rb_usascii_str_new2("."); + return rb_enc_str_new(".", strlen("."), enc); #ifdef DOSISH_DRIVE_LETTER if (has_drive_letter(name) && isdirsep(*(name + 2))) { const char *top = skiproot(name + 2, end, enc);