From 82cf98939f76cb0af206571b50ea81746bfeed7f Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 20 May 2003 06:29:23 +0000 Subject: * eval.c (rb_yield_0): give warning for multiple values for a block parameter. * eval.c (rb_yield_values): a function to yield multiple values. * array.c (sort_1): use rb_yield_values. * enum.c (min_ii, max_ii): ditto. * hash.c (rb_hash_update_block_i, delete_if_i, select_i, each_pair_i, env_each, env_reject_bang, env_select, env_update_i): ditto. * struct.c (rb_struct_each_pair): ditto. * eval.c (top_include): should include module in the current self, not ruby_top_self. [ruby-dev:20198] * eval.c (top_include): stop inclusion to ruby_wrapper; give warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- struct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'struct.c') diff --git a/struct.c b/struct.c index 0ffae5ebfe..6d9c8113a9 100644 --- a/struct.c +++ b/struct.c @@ -346,7 +346,7 @@ rb_struct_each_pair(s) rb_bug("non-initialized struct"); } for (i=0; ilen; i++) { - rb_yield(rb_assoc_new(RARRAY(member)->ptr[i], RSTRUCT(s)->ptr[i])); + rb_yield_values(2, RARRAY(member)->ptr[i], RSTRUCT(s)->ptr[i]); } return s; } -- cgit v1.2.1