Why does '////'.split('/') produce []?

Viewed 458

The code '////'.split('/') results in []. While I expected it to be ['', '', '', '', '']. If this is a feature of ruby, why is it designed like so?

3 Answers
Related