From e70e46a1be711b1bacee43b1922601cb2aa377e5 Mon Sep 17 00:00:00 2001 From: keiju Date: Tue, 15 Jan 2013 13:42:09 +0000 Subject: [PATCH] * 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 --- ChangeLog | 6 ++++++ lib/irb/ext/save-history.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b6e666612f..fff0ec8fb1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Jan 15 22:30:04 2013 Keiju Ishitsuka + + * 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. + Tue Jan 15 15:55:28 2013 Eric Hodel * doc/syntax/control_expressions.rdoc: Added description of control 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