Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Apr 6, 2015
  1. @ko1

    * vm_args.c: protect value stack from calling other methods

    ko1 authored
      during complex parameter setting process (splat, kw, and so on).
      [Bug #11027]
    * vm_core.h: remove rb_thead_t::mark_stack_len.
      With this modification, we don't need to use th->mark_stack_len.
    * test/ruby/test_keyword.rb: add a test.
    * cont.c (cont_capture): catch up this fix.
    * vm.c (rb_thread_mark): ditto.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jan 1, 2015
  1. @nobu

    vm_args.c: fix non-symbol keys hash

    nobu authored
    * vm_args.c (keyword_hash_p): fix non-symbol keys hash.
      rb_extract_keywords() returns 0 not Qnil when no symbol keys is
      included.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Dec 28, 2014
  1. @nobu

    parse.y: fix internal IDs conflict

    nobu authored
    * parse.y (f_kwrest, new_args_tail_gen): unnamed rest keyword and
      keywords bits arguments should be unique.  since internal IDs
      depend on the local variable index in the current scope, new ID
      should be made before popping those vtables.
      [ruby-core:67157] [Bug #10659]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Nov 27, 2014
  1. @ko1

    * vm_args.c: fix backtrace location for keyword related exceptions.

    ko1 authored
      For example, the following program
        def foo(k1: 1); end # line 1
                foo(k2: 2)          # line 2
      causes "unknown keyword: k2 (ArgumentError)".
      Before this patch, the backtrace location is only line 2.
      However, error should be located at line 1 (over line 2 in
      stack trace). This patch fix this problem.
    * class.c (rb_keyword_error_new): separate exception creation logic
      from rb_keyword_error(), to use in vm_args.c.
    * vm_insnhelper.c (rb_arg_error_new): rename to rb_arity_error_new().
    * vm_args.c (argument_arity_error): rename to argument_arity_error().
    * vm_args.c (arugment_kw_error): added to fix backtrace.
    * test/ruby/test_keyword.rb: add tests.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Nov 13, 2014
  1. @akr

    * test/lib/envutil.rb: Moved from test/ruby/.

    akr authored
    * test/lib/find_executable.rb: Ditto.
    
    * test/lib/memory_status.rb: Ditto.
    
    * test/lib/test/unit.rb: require envutil.
    
    * test/: Don't require envutil in test files.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Oct 22, 2014
  1. @nobu

    class.c: delete expected keywords directly

    nobu authored
    * class.c (unknown_keyword_error): delete expected keywords
      directly from raw table, so that the given block is not called.
      [ruby-core:65837] [Bug #10413]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Sep 23, 2014
  1. @nobu

    parse.y: label cannot be followed by a modifier

    nobu authored
    * parse.y (parse_ident): just after a label, new expression should
      start, cannot be a modifier.  [ruby-core:65211] [Bug #10279]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Sep 20, 2014
  1. @nobu

    compile.c: store IDs as Symbols

    nobu authored
    * compile.c (iseq_set_arguments): store local variable IDs in
      temporary list as Symbols.  previously these are stored as
      Fixnums to prevent from GC, but IDs of dynamic symbols can
      exceed Fixnum range and cause RangeError at inverting from
      Fixnum.  [ruby-dev:48564] [Bug #10266]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jul 10, 2014
  1. @nobu

    vm_insnhelper.c: fix implicit splat keyword argument

    nobu authored
    * vm_insnhelper.c (vm_callee_setup_keyword_arg): adjust VM stack
      pointer to get rid of overwriting splat arguments by arguments
      for `to_hash` conversion.  [ruby-core:63593] [Bug #10016]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jun 3, 2014
  1. @nobu

    vm.c: return the result hash

    nobu authored
    * vm.c (core_hash_merge_kwd): should return the result hash, which
      may be converted from and differ from the given argument.
      [ruby-core:62921] [Bug #9898]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Apr 26, 2014
  1. @nobu

    compile.c: non-destructive keyword splat

    nobu authored
    * compile.c (compile_array_): make copy a first hash not to modify
      the argument itself.  keyword splat should be non-destructive.
      [ruby-core:62161] [Bug #9776]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Mar 25, 2014
  1. @nobu

    parse.y: required kwarg without parentheses

    nobu authored
    * parse.y (parser_yylex): only a newline after label should be
      significant.  [ruby-core:61658] [Bug #9669]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  2. @nobu

    parse.y: required kwarg without parentheses

    nobu authored
    * parse.y (lex_state_e, parser_params, f_arglist, parser_yylex):
      separate EXPR_LABELARG from EXPR_BEG and let newline significant,
      so that required keyword argument can place at the end of
      argument list without parentheses.  [ruby-core:61658] [Bug #9669]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Dec 25, 2013
  1. @nobu

    compile.c: unnamed keyword rest check

    nobu authored
    * compile.c (iseq_set_arguments): set arg_keyword_check from
      nd_cflag, which is set by parser.  internal ID is used for
      unnamed keyword rest argument, which should be separated from no
      keyword check.
    * iseq.c (rb_iseq_parameters): if no keyword check, keyword rest is
      present.
    * parse.y (new_args_tail_gen): set keywords check to nd_cflag, which
      equals to that keyword rest is not present.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  2. @nobu

    test_keyword.rb: suppress warnings

    nobu authored
    * test/ruby/test_keyword.rb (test_block_required_keyword): suppress
      shadowing outer variable warning.
    
    * test/ruby/test_keyword.rb (test_precedence_of_keyword_arguments):
      suppress unused variable warning.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Dec 14, 2013
  1. @nobu

    vm_insnhelper.c: post arguments as mandatory

    nobu authored
    * vm_insnhelper.c (vm_callee_setup_arg_complex): count post
      arguments as mandatory arguments.  [ruby-core:57706] [Bug #8993]
    * vm_insnhelper.c (vm_yield_setup_block_args): ditto.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Dec 8, 2013
  1. @nobu

    class.c, vm_insnhelper.c: check unknown keywords

    nobu authored
    * class.c (rb_get_kwargs): if optional is negative, unknown
      keywords are allowed.
    * vm_insnhelper.c (vm_callee_setup_keyword_arg): check unknown
      keywords.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  2. @nobu

    test_keyword.rb: check error messages

    nobu authored
    * test/ruby/test_keyword.rb (test_required_keyword): check also
      error messages.
    
    * test/ruby/test_keyword.rb (test_block_required_keyword): ditto.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Sep 29, 2013
  1. @k-tsj

    * vm_insnhelper.c (vm_callee_setup_arg_complex, vm_yield_setup_block_…

    k-tsj authored
    …args):
    
      clear keyword arguments to prevent GC bug which occurs
      while marking VM stack.
      [ruby-dev:47729] [Bug #8964]
    
    * test/ruby/test_keyword.rb: tests for the above.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jun 1, 2013
  1. @nobu

    compile.c: not simple if keyword args

    nobu authored
    * compile.c (iseq_set_arguments): not a simple single argument if any
      keyword arguments exist.  [ruby-core:55203] [Bug #8463]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  2. @nobu

    vm_insnhelper.c: extract keyword arguments after splat

    nobu authored
    * 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]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on May 30, 2013
  1. @mame

    * vm_insnhelper.c (vm_callee_setup_keyword_arg,

    mame authored
      vm_callee_setup_arg_complex): consider a hash argument for keyword
      only when the number of arguments is more than the expected
      mandatory parameters.  [ruby-core:53199] [ruby-trunk - Bug #8040]
    
    * test/ruby/test_keyword.rb: update a test for above.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on May 18, 2013
  1. @nobu

    compile.c: forward kwrest

    nobu authored
    * compile.c (iseq_compile_each): forward anonymous and first keyword
      rest argument one.  [ruby-core:55033] [Bug #8416].
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Apr 12, 2013
  1. @nobu

    vm_insnhelper.c: non-symbol key

    nobu authored
    * vm_insnhelper.c (vm_callee_setup_keyword_arg): non-symbol key is not
      a keyword argument, keep it as an positional argument.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Apr 9, 2013
  1. @nobu

    compile.c: append keyword hash to splat

    nobu authored
    * compile.c (iseq_compile_each): append keyword hash to argument array
      to splat if needed.  [ruby-core:54094] [Bug #8236]
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Mar 21, 2013
  1. @nobu

    vm_insnhelper.c: check required kwarg with resthash

    nobu authored
    * vm_insnhelper.c (vm_callee_setup_keyword_arg): should check required
      keyword arguments even if rest hash is defined.  [ruby-core:53608]
      [Bug #8139]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Mar 12, 2013
  1. @nobu

    required keyword arguments

    nobu authored
    * compile.c (iseq_set_arguments, iseq_compile_each): support required
      keyword arguments.   [ruby-core:51454] [Feature #7701]
    * iseq.c (rb_iseq_parameters): ditto.
    * parse.y (f_kw, f_block_kw): ditto.  this syntax is still
      experimental, the notation may change.
    * vm_core.h (rb_iseq_struct): ditto.
    * vm_insnhelper.c (vm_callee_setup_keyword_arg): ditto.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Feb 26, 2013
  1. @nobu

    test_keyword.rb: suppress warning

    nobu authored
    * test/ruby/test_keyword.rb (TestKeywordArguments#m1): suppress
      argument prefix warning.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  2. @nobu

    parse.y: keyword argument without paren

    nobu authored
    * parse.y (IS_LABEL_POSSIBLE): allow labels for keyword arguments just
      after method definition without a parenthesis.  [ruby-core:52820]
      [Bug #7942]
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jan 7, 2013
  1. @nobu

    parse.y: bare kwrest_mark

    nobu authored
    * parse.y (f_kwrest): allow bare kwrest_mark as valid syntax.  its
      semantics is still undefined.  [Bug #7662] [ruby-core:51269]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  2. @nobu

    vm_insnhelper.c: keyrest should not overwrite rest arg

    nobu authored
    * vm_insnhelper.c (vm_callee_setup_arg_complex, vm_yield_setup_block_args):
      set keyrest hash after making rest array, so that the last element
      will not be overwritten.  [ruby-core:51278] [Bug #7665]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Dec 30, 2012
  1. @k-tsj

    * test/ruby/test_keyword.rb: add a test for passing hash

    k-tsj authored
      as a last argument. [ruby-dev:46712] [Bug #7529]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  2. @k-tsj

    * vm_insnhelper.c: set keyword hash on Proc/block calls.

    k-tsj authored
      [ruby-core:51172] [Bug #7630]
    
    * test/ruby/test_keyword.rb: add tests for above.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Dec 11, 2012
  1. @eregon

    * iseq.c (rb_iseq_parameters): fix limit for optional arguments.

    eregon authored
    * test/ruby/test_keyword.rb: tests for above.
    * vm_core.h (struct rb_iseq_struct): update documentation
      with keyword arguments. [Bug #7540] [ruby-core:50735]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Dec 26, 2011
  1. @mame

    * vm_core.h (struct rb_iseq_struct), compile.c (iseq_set_arguments), …

    mame authored
    …iseq.c (rb_iseq_parameters), vm_insnhelper.c (vm_callee_setup_arg_complex): support Method#parameters for keyword arguments. The provisional spec is what Benoit Daloze proposed. [ruby-core:40518]
    
    * test/ruby/test_keyword.rb: add a test for above.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Something went wrong with that request. Please try again.