This issue was solved with changeset r38719.
Nobuyoshi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
vm_insnhelper.c: keyrest should not overwrite rest arg
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]