diff options
author | sonots <sonots@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-21 05:07:43 +0000 |
---|---|---|
committer | sonots <sonots@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-21 05:07:43 +0000 |
commit | 7176eb2df98ed89e686c5cc116e9e88ecb238a1c (patch) | |
tree | 5af26662c081b3bb7b76b80f67ab5b75d4207ecd /lib | |
parent | 2c075d38635afc01ca7b7d75fbd11332a122c06f (diff) |
* lib/logger.rb (Logger::LogDevice#open_logfile, #create_logfile):
Logger should be able to open only files [Bug #14212]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/logger.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/logger.rb b/lib/logger.rb index f572921db4..4ccc03b614 100644 --- a/lib/logger.rb +++ b/lib/logger.rb @@ -743,7 +743,7 @@ private def open_logfile(filename) begin - open(filename, (File::WRONLY | File::APPEND)) + File.open(filename, (File::WRONLY | File::APPEND)) rescue Errno::ENOENT create_logfile(filename) end @@ -751,7 +751,7 @@ private def create_logfile(filename) begin - logdev = open(filename, (File::WRONLY | File::APPEND | File::CREAT | File::EXCL)) + logdev = File.open(filename, (File::WRONLY | File::APPEND | File::CREAT | File::EXCL)) logdev.flock(File::LOCK_EX) logdev.sync = true add_log_header(logdev) |