Random - based on :rand (not :random)

It was late, that’s why I missed it, I think :frowning: But thank you very much for answer.

1 Like

This rand(a..b) is very useful and needed. It reminds Ruby :slight_smile:
Using :rand or :random can be painful, because of lack of documentation.

@josevalim, incorporate this rand in The Language and polish the docs :slight_smile:

1 Like

As said above, it is already part of the language: Enum.random(1..3). :slight_smile:

3 Likes

Ahh, ok. Inside Enum. Thanks then :slight_smile:

1 Like