Skip to content

Multiple assignments result in wrong parameters #5647

@dearblue

Description

@dearblue
% bin/mruby -e 'def m((x, y, z), &b) { x:, y:, z:, b: } end; p m([1, 2, 3]) {}'
{:x=>1, :y=>2, :z=>3, :b=>[1, 2, 3]}

This happens in the latest master (commit ad3ce7b) and 3.1.0-rc (commit f29924c).
The triggering commit seems to be 9e064f2.
I tried revert and got the expected result.

% bin/mruby -e 'def m((x, y, z), &b) { x:, y:, z:, b: } end; p m([1, 2, 3]) {}'
{:x=>1, :y=>2, :z=>3, :b=>#<Proc:0x800e300f0@-e:1>}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions