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

ruby-changes:65897

From: Gannon <ko1@a...>
Date: Tue, 20 Apr 2021 21:35:47 +0900 (JST)
Subject: [ruby-changes:65897] b56c8f814e (master): [ruby/logger] Replace "iff" with "if and only if"

https://git.ruby-lang.org/ruby.git/commit/?id=b56c8f814e

From b56c8f814e656e6a680acf2e5c96812e84af238d Mon Sep 17 00:00:00 2001
From: Gannon McGibbon <gannon.mcgibbon@g...>
Date: Tue, 19 Jan 2021 17:13:53 -0500
Subject: [ruby/logger] Replace "iff" with "if and only if"

iff means if and only if, but readers without that knowledge might
assume this to be a spelling mistake. To me, this seems like
exclusionary language that is unnecessary. Simply using "if and only if"
instead should suffice.

https://github.com/ruby/logger/commit/4fa0c28e00
---
 lib/logger.rb | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/logger.rb b/lib/logger.rb
index 5e88574..4205380 100644
--- a/lib/logger.rb
+++ b/lib/logger.rb
@@ -302,35 +302,35 @@ class Logger https://github.com/ruby/ruby/blob/trunk/lib/logger.rb#L302
   alias sev_threshold level
   alias sev_threshold= level=
 
-  # Returns +true+ iff the current severity level allows for the printing of
+  # Returns +true+ if and only if the current severity level allows for the printing of
   # +DEBUG+ messages.
   def debug?; level <= DEBUG; end
 
   # Sets the severity to DEBUG.
   def debug!; self.level = DEBUG; end
 
-  # Returns +true+ iff the current severity level allows for the printing of
+  # Returns +true+ if and only if the current severity level allows for the printing of
   # +INFO+ messages.
   def info?; level <= INFO; end
 
   # Sets the severity to INFO.
   def info!; self.level = INFO; end
 
-  # Returns +true+ iff the current severity level allows for the printing of
+  # Returns +true+ if and only if the current severity level allows for the printing of
   # +WARN+ messages.
   def warn?; level <= WARN; end
 
   # Sets the severity to WARN.
   def warn!; self.level = WARN; end
 
-  # Returns +true+ iff the current severity level allows for the printing of
+  # Returns +true+ if and only if the current severity level allows for the printing of
   # +ERROR+ messages.
   def error?; level <= ERROR; end
 
   # Sets the severity to ERROR.
   def error!; self.level = ERROR; end
 
-  # Returns +true+ iff the current severity level allows for the printing of
+  # Returns +true+ if and only if the current severity level allows for the printing of
   # +FATAL+ messages.
   def fatal?; level <= FATAL; end
 
-- 
cgit v1.1


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

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