by edbrown23 · 6y ago · 0 comments
[1] https://makandracards.com/makandra/46939-ruby-a-small-summar...
'//'.split('/') # => [] instead of ['', '', '']
'/'.split('/') # => [] instead of ['', '']
''.split('/') # => [] instead of ['']
'//'.split('/', -1) # => ['', '', '']
'/'.split('/', -1) # => ['', '']
''.split('/', -1) # => [] instead of ['']
In comparison: "".split("/") # => [""] in javascript
"".split("/") # => [""] in python