summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hash.c b/hash.c
index dda50abe12..468830a075 100644
--- a/hash.c
+++ b/hash.c
@@ -1327,10 +1327,10 @@ env_select(argc, argv)
while (*env) {
char *s = strchr(*env, '=');
if (s) {
- VALUE str = rb_tainted_str_new(*env, s-*env);
-
- if (RTEST(rb_yield(str))) {
- rb_ary_push(result, str);
+ VALUE assoc = rb_assoc_new(rb_tainted_str_new(*env, s-*env),
+ rb_tainted_str_new2(s+1));
+ if (RTEST(rb_yield(assoc))) {
+ rb_ary_push(result, assoc);
}
}
env++;