mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/irb/ext/save-history.rb: identify rightly a status of a
history file that already exists [Bug #7694]. Thanks Nobuhiro IMAI for this patch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e071e13068
commit
e70e46a1be
2 changed files with 7 additions and 1 deletions
|
@ -95,7 +95,7 @@ module IRB
|
|||
|
||||
# Change the permission of a file that already exists[BUG #7694]
|
||||
begin
|
||||
if File.stat(history_file).mode & 066
|
||||
if File.stat(history_file).mode & 066 != 0
|
||||
File.chmod(0600, history_file)
|
||||
end
|
||||
rescue Errno::ENOENT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue