Skip to content

Instantly share code, notes, and snippets.

@tobiashm
Created April 28, 2015 19:54
Show Gist options
  • Select an option

  • Save tobiashm/a3a7da6fb48bb1848405 to your computer and use it in GitHub Desktop.

Select an option

Save tobiashm/a3a7da6fb48bb1848405 to your computer and use it in GitHub Desktop.
Join Ruby Pathname with slashes
require "pathname"
Pathname.class_eval { alias join / }
Pathname.new("foo") / "bar" / "baz" # => #<Pathname:foo/bar/baz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment