Project

General

Profile

Actions

Bug #13022

closed

Nested array syntax error returns nil

Added by harrywhelchel (Harry Whelchel) over 7 years ago. Updated over 7 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:78584]

Description

If you leave out a comma in a nested array, ruby returns nil instead of raising a SyntaxError. Is this expected behavior?

  1. Create a nested array with a missing comma:

[[1,3], [5,6] [11, 15], [17,22]] #=> [[1, 3], nil, [17, 22]]

Actions

Also available in: Atom PDF

Like0
Like0Like0