Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. diff --git a/vm_args.c b/vm_args.c
  2. index 6fce593bf1..4ae0d6d7fc 100644
  3. --- a/vm_args.c
  4. +++ b/vm_args.c
  5. @@ -735,15 +735,7 @@ setup_parameters_complex(rb_execution_context_t * const ec, const rb_iseq_t * co
  6. rest_last = RARRAY_AREF(args->rest, len - 1);
  7.  
  8. if (!kw_flag && len > 0) {
  9. - if (RB_TYPE_P(rest_last, T_HASH) &&
  10. - (((struct RHash *)rest_last)->basic.flags & RHASH_PASS_AS_KEYWORDS)) {
  11. - rest_last = rb_hash_dup(rest_last);
  12. - RARRAY_ASET(args->rest, len - 1, rest_last);
  13. - kw_flag |= VM_CALL_KW_SPLAT;
  14. - }
  15. - else {
  16. - rest_last = 0;
  17. - }
  18. + rest_last = 0;
  19. }
  20.  
  21. if (kw_flag & VM_CALL_KW_SPLAT) {
  22. diff --git a/vm_insnhelper.c b/vm_insnhelper.c
  23. index c7dd213035..16df7c9fa0 100644
  24. --- a/vm_insnhelper.c
  25. +++ b/vm_insnhelper.c
  26. @@ -1790,12 +1790,6 @@ CALLER_SETUP_ARG(struct rb_control_frame_struct *restrict cfp,
  27. * So, ci->flag & VM_CALL_ARGS_SPLAT is now inconsistent.
  28. */
  29. vm_caller_setup_arg_splat(cfp, calling);
  30. - if (!IS_ARGS_KW_OR_KW_SPLAT(ci) &&
  31. - calling->argc > 0 &&
  32. - RB_TYPE_P(*(cfp->sp - 1), T_HASH) &&
  33. - (((struct RHash *)*(cfp->sp - 1))->basic.flags & RHASH_PASS_AS_KEYWORDS)) {
  34. - calling->kw_splat = 1;
  35. - }
  36. }
  37. if (UNLIKELY(IS_ARGS_KEYWORD(ci))) {
  38. /* This converts VM_CALL_KWARG style to VM_CALL_KW_SPLAT style
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement