Skip to content

Ranges don't allow the use of variables in 0.5.4 #65

Closed
@ceymard

Description

@ceymard
a = [1, 2, 3]
a[1..a.length]
Cannot read property 'length' of undefined

b = a.length
# returns undefined
a[1..b]

a[1 to a.length]
a[1 to b]
SyntaxError: empty range on line 1

So basically there seems to be a problem with using variables in ranges.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions