From a0a2c144b8b078cea668a703e2308ea64d4eb161 Mon Sep 17 00:00:00 2001 From: mame Date: Mon, 26 Dec 2011 14:20:09 +0000 Subject: * vm_core.h (struct rb_iseq_struct), compile.c (iseq_set_arguments, iseq_compile_each), vm_insnhelper.c (vm_callee_setup_arg_complex): implement keyword arguments. See [ruby-core:40290] The feature is promised to be included in 2.0, but the detail spec is still under discussion; this commit is a springboard for further discussion. Please try it and give us feedback. This commit includes fixes for some problems reported by Benoit Daloze [ruby-core:40518] and Marc-Andre Lafortune [ruby-core:41772]. * iseq.c (iseq_free, prepare_iseq_build): bookkeeping. * test/ruby/test_keyword.rb: add tests for keyword arguments. * test/ripper/dummyparser.rb (class DummyParser): temporal fix for ripper test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_core.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vm_core.h') diff --git a/vm_core.h b/vm_core.h index d44bd25298..df186a0b58 100644 --- a/vm_core.h +++ b/vm_core.h @@ -220,6 +220,9 @@ struct rb_iseq_struct { int arg_post_start; int arg_size; VALUE *arg_opt_table; + int arg_keyword; + int arg_keywords; + ID *arg_keyword_table; size_t stack_max; /* for stack overflow check */ -- cgit v1.2.3