Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

File.join Shorthand

DZone's Guide to

File.join Shorthand

·
Free Resource
A Ruby shorthand for writing foo/bar instead of File.join(foo, bar)


class String
  def /(other)
    File.join(self, other)
  end
end
Topics:

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}