summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-30 03:31:58 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-30 03:31:58 +0000
commitbfaba73ebbb798d9ecfda47ecf2b0c0a14edc4b4 (patch)
treebbe13f12a31674c5acbcd1848bd19dce2bb32a45
parent44666293ffe2b29d77ed2bae78702242b30acb6b (diff)
* file.c (append_fspath): need to set the encoding to result always.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--file.c2
2 files changed, 5 insertions, 1 deletions
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 <usa@ruby-lang.org>
+
+ * file.c (append_fspath): need to set the encoding to result always.
+
Mon Jan 30 10:38:37 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* 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;
}