A Replacement For Ruby's File.join
Join the DZone community and get the full member experience.
Join For FreeFile.join is ugly, there I've said it. So how about being able to replace this:
require File.join(LOAD_PATH, 'foobar')
With this:
require LOAD_PATH/:foobar
Trivial, really:
class String
def /(o)
File.join(self, o.to_s)
end
end
Opinions expressed by DZone contributors are their own.
Comments