Skip to content

Hash-rocket join syntax bug/misfeature #322

Description

@neilconway

In this join:

t1 <= (t2 * t3).pairs(:key => :k1, :key => :k2) {|x,y| [x.val, y.val]}

The arguments to pairs are passed as a hash. Hence, we're supplying two different values for the ":key" hash key, so Ruby silently ignores the first one (k1), taking only the second. Easy to fix (e.g., reverse the join operands), but certainly surprising behavior.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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