[前][次][番号順一覧][スレッド一覧]

ruby-changes:26782

From: keiju <ko1@a...>
Date: Tue, 15 Jan 2013 22:42:20 +0900 (JST)
Subject: [ruby-changes:26782] keiju:r38834 (trunk): * lib/irb/ext/save-history.rb: identify rightly a status of a

keiju	2013-01-15 22:42:09 +0900 (Tue, 15 Jan 2013)

  New Revision: 38834

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38834

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/lib/irb/ext/save-history.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38833)
+++ ChangeLog	(revision 38834)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Jan 15 22:30:04 2013  Keiju Ishitsuka  <keiju@i...>
+
+	* 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  <drbrain@s...>
 
 	* doc/syntax/control_expressions.rdoc:  Added description of control
Index: lib/irb/ext/save-history.rb
===================================================================
--- lib/irb/ext/save-history.rb	(revision 38833)
+++ lib/irb/ext/save-history.rb	(revision 38834)
@@ -95,7 +95,7 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/ext/save-history.rb#L95
 
 	# 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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]