Closed ashmaroli closed 6 years ago
What happens if File::SEPARATOR
is not /
?
split("/")
is very easy to read, but File.basename
feels a bit wonky since we are not actually working with files, but URLs. I'm much more concerned with readability than performance, since an Utterson build takes ten minutes, but this script runs in less than a tenth of a second.
we are not actually working with files, but URLs
True. But this felt more readable to me than url.split("/").last
@ashmaroli Personal preference, I guess