aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/file
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-06 17:58:50 +0200
committerXavier Noria <fxn@hashref.com>2016-08-06 18:10:53 +0200
commitd66e7835bea9505f7003e5038aa19b6ea95ceea1 (patch)
tree9846f86c6d130595f54c389c83b66d57101563c5 /activesupport/lib/active_support/core_ext/file
parent77eb40dab64e1fe2a759044d4f122dc0ef833141 (diff)
downloadrails-d66e7835bea9505f7003e5038aa19b6ea95ceea1.tar.gz
rails-d66e7835bea9505f7003e5038aa19b6ea95ceea1.tar.bz2
rails-d66e7835bea9505f7003e5038aa19b6ea95ceea1.zip
applies new string literal convention in activesupport/lib
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
Diffstat (limited to 'activesupport/lib/active_support/core_ext/file')
-rw-r--r--activesupport/lib/active_support/core_ext/file/atomic.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/core_ext/file/atomic.rb b/activesupport/lib/active_support/core_ext/file/atomic.rb
index 463fd78412..8d6c0d3685 100644
--- a/activesupport/lib/active_support/core_ext/file/atomic.rb
+++ b/activesupport/lib/active_support/core_ext/file/atomic.rb
@@ -1,4 +1,4 @@
-require 'fileutils'
+require "fileutils"
class File
# Write to a file atomically. Useful for situations where you don't
@@ -17,7 +17,7 @@ class File
# file.write('hello')
# end
def self.atomic_write(file_name, temp_dir = dirname(file_name))
- require 'tempfile' unless defined?(Tempfile)
+ require "tempfile" unless defined?(Tempfile)
Tempfile.open(".#{basename(file_name)}", temp_dir) do |temp_file|
temp_file.binmode
@@ -53,11 +53,11 @@ class File
# Private utility method.
def self.probe_stat_in(dir) #:nodoc:
basename = [
- '.permissions_check',
+ ".permissions_check",
Thread.current.object_id,
Process.pid,
rand(1000000)
- ].join('.')
+ ].join(".")
file_name = join(dir, basename)
FileUtils.touch(file_name)