Sha256: 7793ff4aa771f2a33ff6453a6637b2908288344bf5f93e07d8fd77cec0f6608a

Contents?: true

Size: 253 Bytes

Versions: 91

Compression:

Stored size: 253 Bytes

Contents

module PathSep
  def /(right)
    s1 = self.to_s.dup
    s2 = right.to_s.dup
    s1 << "/" unless s1.end_with?("/") || s2.start_with?("/")
    path = s1 + s2
    path.gsub!("//", "/")
    path
  end
end

String.include(PathSep)
Symbol.include(PathSep)

Version data entries

91 entries across 91 versions & 1 rubygems

Version Path
runeblog-0.2.85 lib/pathmagic.rb
runeblog-0.2.84 lib/pathmagic.rb
runeblog-0.2.83 lib/pathmagic.rb
runeblog-0.2.82 lib/pathmagic.rb
runeblog-0.2.81 lib/pathmagic.rb
runeblog-0.2.80 lib/pathmagic.rb
runeblog-0.2.79 lib/pathmagic.rb
runeblog-0.2.78 lib/pathmagic.rb
runeblog-0.2.77 lib/pathmagic.rb
runeblog-0.2.76 lib/pathmagic.rb
runeblog-0.2.75 lib/pathmagic.rb
runeblog-0.2.74 lib/pathmagic.rb
runeblog-0.2.73 lib/pathmagic.rb
runeblog-0.2.72 lib/pathmagic.rb
runeblog-0.2.71 lib/pathmagic.rb
runeblog-0.2.70 lib/pathmagic.rb
runeblog-0.2.69 lib/pathmagic.rb
runeblog-0.2.66 lib/pathmagic.rb
runeblog-0.2.65 lib/pathmagic.rb
runeblog-0.2.64 lib/pathmagic.rb