Over a million developers have joined DZone.

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
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}