diff options
author | keiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-15 13:42:09 +0000 |
---|---|---|
committer | keiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-15 13:42:09 +0000 |
commit | e70e46a1be711b1bacee43b1922601cb2aa377e5 (patch) | |
tree | 360b1e638ee8b528a1ce4ea21f8121629908f08c /lib/irb | |
parent | e071e13068a92c367a87f529926997657c309ce3 (diff) | |
download | ruby-e70e46a1be711b1bacee43b1922601cb2aa377e5.tar.gz |
* 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
Diffstat (limited to 'lib/irb')
-rw-r--r-- | lib/irb/ext/save-history.rb | 2 |
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 |