DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
A Replacement For Ruby's File.join
File.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





Comments
Nic Williams replied on Thu, 2006/04/20 - 8:32am