From f2c2fb5ac4929395885ae349231de49d62e2fde4 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 25 Feb 2002 09:16:25 +0000 Subject: * eval.c (method_inspect): should not dump core for unbound singleton methods. * object.c (rb_mod_to_s): better description. * hash.c (env_select): should path the assoc list. * process.c (rb_syswait): thread kludge; should be fixed to support native thread. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- hash.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'hash.c') diff --git a/hash.c b/hash.c index dda50abe1..468830a07 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++; -- cgit