pathutil 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f138d46034581f06a1a7a8709dcb93139a061035
4
- data.tar.gz: 73d5d3993853e1d1d1af8d131d33695bcbf03f3b
3
+ metadata.gz: 864e32b983eecdfbc1d928d509e4ca432ae92b4e
4
+ data.tar.gz: 29d984696ed37007719707369022c6f015dd3744
5
5
  SHA512:
6
- metadata.gz: 1503044c0811bcb9aaa45ac9f51ed331dd38976e1b90b22bce9fd010ede4e06f3df0ca9d502891731fb4de7c37fc739bec4e1fb3362eab94283db752233084e8
7
- data.tar.gz: 81374d37025cdddb597f88ffb44b9da0049acc826b5cd4276644624e59f591a0a5f30bacc8d1c7a9475488616bcb9591206c1830ef3e0dae737c076d80213990
6
+ metadata.gz: 4dde75fdcebede966d9ece517593bd1e8c6db7c4ee6cd91bba57a7218b185754dde2abe8f879d01c4132d9e3bc6437f6384128f407dca659c66173fb2055989e
7
+ data.tar.gz: d8d52741f92e185cc132186439e9657c2422492cd8fafbed06057b5b4a0c6a417a046acab5101fd35233aeb6aa0b24dbfb21eceb0ad678c3c156fade8703ac9c
@@ -34,11 +34,12 @@ class Pathutil
34
34
 
35
35
  # ------------------------------------------------------------------------
36
36
 
37
- def make_tmpname(prefix = "", suffix = nil, root = Dir::Tmpname.tmpdir)
37
+ def make_tmpname(prefix = "", suffix = nil, root = nil)
38
38
  prefix = prefix.join("-") if prefix.is_a?(Array)
39
39
  suffix = suffix.join("-") if suffix.is_a?(Array)
40
40
  suffix = suffix.gsub(/\A\-/, "") unless !suffix || suffix.empty?
41
41
  prefix = prefix.gsub(/\-\Z/, "") + "-" unless prefix.empty?
42
+ root ||= Dir::Tmpname.tmpdir
42
43
 
43
44
  File.join(root, Dir::Tmpname.make_tmpname(
44
45
  prefix, suffix
@@ -5,5 +5,5 @@
5
5
  # ----------------------------------------------------------------------------
6
6
 
7
7
  class Pathutil
8
- VERSION = "0.4.0"
8
+ VERSION = "0.4.1"
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pathutil
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordon Bedwell