opal/opal

Incompatibility in multiple assignment

Open

#1,703 创建于 2017年9月30日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)Ruby (4,766 star) (382 fork)batch import
bughelp wantedlanguagev1.2

描述

I found this code behaves differently between Opal (git master) vs. Ruby (2.4.2).

((x, y)) = [[1,2]]

Here is the results:

$ ./bin/opal -e '((x, y)) = [[1,2]]; p(["x", x, "y", y])'
["x", [1, 2], "y", nil]
$ ruby -e '((x, y)) = [[1,2]]; p(["x", x, "y", y])'
["x", 1, "y", 2]

贡献者指南