summaryrefslogtreecommitdiff
path: root/lib/irb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/irb')
-rw-r--r--lib/irb/ext/save-history.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb/ext/save-history.rb b/lib/irb/ext/save-history.rb
index 90beefbc6c..d61fec9ff7 100644
--- a/lib/irb/ext/save-history.rb
+++ b/lib/irb/ext/save-history.rb
@@ -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