We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe95156 commit 17d949aCopy full SHA for 17d949a
1 file changed
benchmark/pathname.yml
@@ -0,0 +1,20 @@
1
+prelude: |
2
+ abs = Pathname("/a")
3
+ rel = Pathname("a")
4
+ p1 = Pathname.new('foo/././././bar')
5
+ p2 = Pathname.new('foo/bar/./../..')
6
+ p3 = Pathname.new('foo/bar/zot')
7
+ class Pathname
8
+ public :path, :chop_basename, :split_names
9
+ end
10
+benchmark:
11
+ p1.chop_basename: p1.chop_basename(p1.path)
12
+ p1.split_names: p1.split_names(p1.path)
13
+ p1+p2: p1+p2
14
+ abs.root?: abs.root?
15
+ rel.root?: rel.root?
16
+ abs.absolute?: abs.absolute?
17
+ rel.absolute?: rel.absolute?
18
+ p1.cleanpath: p1.cleanpath
19
+ p2.cleanpath: p2.cleanpath
20
+ relative_path_from: p3.relative_path_from('foo/bar/qux/quax')
0 commit comments