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

ruby-changes:64988

From: Gannon <ko1@a...>
Date: Fri, 22 Jan 2021 03:22:49 +0900 (JST)
Subject: [ruby-changes:64988] 871b4612b0 (master): [ruby/matrix] Replace "iff" with "whether" [doc]

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

From 871b4612b07c37a853240228779dc16a64a51227 Mon Sep 17 00:00:00 2001
From: Gannon McGibbon <gannon.mcgibbon@g...>
Date: Wed, 20 Jan 2021 17:52:38 -0500
Subject: [ruby/matrix] Replace "iff" with "whether" [doc]

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 "whether"
when describing return values should suffice.

diff --git a/lib/matrix.rb b/lib/matrix.rb
index 0a17678..298269a 100644
--- a/lib/matrix.rb
+++ b/lib/matrix.rb
@@ -1016,7 +1016,7 @@ class Matrix https://github.com/ruby/ruby/blob/trunk/lib/matrix.rb#L1016
   #++
 
   #
-  # Returns +true+ if and only if the two matrices contain equal elements.
+  # Returns whether the two matrices contain equal elements.
   #
   def ==(other)
     return false unless Matrix === other &&
@@ -2134,7 +2134,7 @@ class Vector https://github.com/ruby/ruby/blob/trunk/lib/matrix.rb#L2134
   #++
 
   #
-  # Returns +true+ iff all of vectors are linearly independent.
+  # Returns whether all of vectors are linearly independent.
   #
   #   Vector.independent?(Vector[1,0], Vector[0,1])
   #   #  => true
@@ -2152,7 +2152,7 @@ class Vector https://github.com/ruby/ruby/blob/trunk/lib/matrix.rb#L2152
   end
 
   #
-  # Returns +true+ iff all of vectors are linearly independent.
+  # Returns whether all of vectors are linearly independent.
   #
   #   Vector[1,0].independent?(Vector[0,1])
   #   # => true
@@ -2165,7 +2165,7 @@ class Vector https://github.com/ruby/ruby/blob/trunk/lib/matrix.rb#L2165
   end
 
   #
-  # Returns +true+ iff all elements are zero.
+  # Returns whether all elements are zero.
   #
   def zero?
     all?(&:zero?)
@@ -2193,7 +2193,7 @@ class Vector https://github.com/ruby/ruby/blob/trunk/lib/matrix.rb#L2193
   #++
 
   #
-  # Returns +true+ iff the two vectors have the same elements in the same order.
+  # Returns whether the two vectors have the same elements in the same order.
   #
   def ==(other)
     return false unless Vector === other
-- 
cgit v0.10.2


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

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