From 805c20a8e59315f15dbb22ac1518de6a27385039 Mon Sep 17 00:00:00 2001 From: akr Date: Mon, 5 Oct 2015 13:27:48 +0000 Subject: * lib/pp.rb: Use frozen_string_literal: true. * lib/prettyprint.rb: Ditto. * lib/resolv.rb: Ditto. * lib/tmpdir.rb: Ditto. * test/test_pp.rb: Ditto. * test/test_prettyprint.rb: Ditto. * tool/transcode-tblgen.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/tmpdir.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/tmpdir.rb') diff --git a/lib/tmpdir.rb b/lib/tmpdir.rb index 494725cb33..eafde411a0 100644 --- a/lib/tmpdir.rb +++ b/lib/tmpdir.rb @@ -1,3 +1,4 @@ +# -*- frozen_string_literal: true -*- # # tmpdir - retrieve temporary directory path # @@ -111,7 +112,7 @@ class Dir suffix &&= (String.try_convert(suffix) or raise ArgumentError, "unexpected suffix: #{suffix.inspect}") t = Time.now.strftime("%Y%m%d") - path = "#{prefix}#{t}-#{$$}-#{rand(0x100000000).to_s(36)}" + path = "#{prefix}#{t}-#{$$}-#{rand(0x100000000).to_s(36)}".dup path << "-#{n}" if n path << suffix if suffix path -- cgit v1.2.3