About 6 months ago or so, I rewrote the Pathname library to internally
store a path as an Array instead of a String. It appears to be about
20% faster than the original and the code is a good bit less complex. I
no longer subscribte to ruby-dev and I'm not sure who is responsible
for such things, so I'm posting here. Would a Ruby developer like to
have a look and consider it as an update of the current lib?
In message "Re: Pathname" on Sun, 28 May 2006 11:56:05 +0900, transfire@gmail.com writes:
About 6 months ago or so, I rewrote the Pathname library to internally
store a path as an Array instead of a String. It appears to be about
20% faster than the original and the code is a good bit less complex. I
no longer subscribte to ruby-dev and I'm not sure who is responsible
for such things, so I'm posting here. Would a Ruby developer like to
have a look and consider it as an update of the current lib?
In article <1148784962.397850.112760@y43g2000cwc.googlegroups.com>,
transfire@gmail.com writes:
About 6 months ago or so, I rewrote the Pathname library to internally
store a path as an Array instead of a String. It appears to be about
20% faster than the original and the code is a good bit less complex. I
no longer subscribte to ruby-dev and I'm not sure who is responsible
for such things, so I'm posting here. Would a Ruby developer like to
have a look and consider it as an update of the current lib?
I don't like it. A pathname may have different structure on
different environment.
I think rewriting it in C is appropriate way to make it faster.
Some other array-like methods seem useful too, #each for instance.
More importantly, I think it would be nice if there were a shorter way
to define a path, perhaps a percent literal like %p{a/b}. Haing to
spell out Pathname.new all the time deters one from using it over a
simple String and the File class methods.