diff --git a/ChangeLog b/ChangeLog index 0c32856b4c..58a57f79d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Jan 30 12:31:05 2012 NAKAMURA Usaku + + * file.c (append_fspath): need to set the encoding to result always. + Mon Jan 30 10:38:37 2012 NAKAMURA Usaku * test/irb/test_completion.rb: skip if cannot load irb/completion diff --git a/file.c b/file.c index e5785bd249..11e9766f86 100644 --- a/file.c +++ b/file.c @@ -2888,7 +2888,6 @@ append_fspath(VALUE result, VALUE fname, char *dir, rb_encoding **enc, rb_encodi RSTRING_GETMEM(dirname, cwdp, dirlen); } *enc = direnc; - rb_enc_associate(result, direnc); } do {buflen *= 2;} while (dirlen > buflen); rb_str_resize(result, buflen); @@ -2896,6 +2895,7 @@ append_fspath(VALUE result, VALUE fname, char *dir, rb_encoding **enc, rb_encodi memcpy(buf, cwdp, dirlen); xfree(dir); if (!NIL_P(dirname)) rb_str_resize(dirname, 0); + rb_enc_associate(result, *enc); return buf + dirlen; }