Skip to content

Multiple assignment in conditionals possible #2433

Description

@endofunky

However, it shouldn't be, according to MRI.

Example:

foo = [1,2]

if (a, b = foo)
  puts a
  puts b
end

MRI:

% ruby ./t.rb
./t.rb:6: multiple assignment in conditional

JRuby 9k:

% ruby ./t.rb
1
2

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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions