summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-29 15:33:50 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-29 15:33:50 +0000
commit674ea103fa113707747e572be682c11d34af739e (patch)
tree8f11645526f3fd56c818814361b82a2cc82eee67 /array.c
parent1195ba6644dd68123beeaa1efc228f8e7cfad4b1 (diff)
* array.c (rb_ary_join): [].join.encoding must be US-ASCII.
[ruby-list:47790] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/array.c b/array.c
index 7624e1ffe5..6420e5b645 100644
--- a/array.c
+++ b/array.c
@@ -1681,7 +1681,7 @@ rb_ary_join(VALUE ary, VALUE sep)
int untrust = FALSE;
VALUE val, tmp, result;
- if (RARRAY_LEN(ary) == 0) return rb_str_new(0, 0);
+ if (RARRAY_LEN(ary) == 0) return rb_usascii_str_new(0, 0);
if (OBJ_TAINTED(ary) || OBJ_TAINTED(sep)) taint = TRUE;
if (OBJ_UNTRUSTED(ary) || OBJ_UNTRUSTED(sep)) untrust = TRUE;