Re:FasterPath: Faster Pathname Handling for Ruby Written in ...
by 33degrees on Friday June 17, 2016 @02:22PM
(#11924481)
A quick look at the tests[1] shows that it handles drive letters. The current implementation is probably not the most efficient though...
[1] https://github.com/ruby/ruby/blob/68ebbbfebe5b666cf76ab41f1e...
Re:FasterPath: Faster Pathname Handling for Ruby Written in ...
by munificent on Friday June 17, 2016 @02:48PM
(#11924719)
That returns a wrong result on Windows paths, and throws an exception on the empty string.
There are a ton of edge cases in path manipulation code.
If I change it to just check the first character for the file separator, as I understand FasterPath does, then of course it is faster:
My implementation: [1] https://github.com/ruby/ruby/blob/68ebbbfebe5b666cf76ab41f1e...