merge revision(s) 41019,41020,41021,41041,41045,41057: [Backport #8463]

vm_insnhelper.c: add comments

	* vm_insnhelper.c (vm_yield_setup_block_args): break a long line and
  add comments.  remove useless code.
	* vm_insnhelper.c (vm_yield_setup_block_args): split single parameter
	  if any keyword arguments exist, and then extract keyword arguments.
	  [ruby-core:55203] [Bug #8463]

	* compile.c (iseq_set_arguments): not a simple single argument if any
	  keyword arguments exist.  [ruby-core:55203] [Bug #8463]

	* vm_insnhelper.c (vm_yield_setup_block_args): partially revert r41019.
	  The code is not useless.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagachika 2013-06-12 15:03:22 +00:00
parent 63bc35ffb0
commit 1135cc3596
6 changed files with 48 additions and 9 deletions

View file

@ -1264,7 +1264,8 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *optargs, NODE *node_args)
}
if (iseq->type == ISEQ_TYPE_BLOCK) {
if (iseq->arg_opts == 0 && iseq->arg_post_len == 0 && iseq->arg_rest == -1) {
if (iseq->arg_opts == 0 && iseq->arg_post_len == 0 &&
iseq->arg_rest == -1 && iseq->arg_keyword == -1) {
if (iseq->argc == 1 && last_comma == 0) {
/* {|a|} */
iseq->arg_simple |= 0x02;