1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/strscan] Replace "iff" with "if and only if" (#18)

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/strscan/commit/066451c11e
This commit is contained in:
Gannon McGibbon 2021-01-20 20:39:21 -05:00 committed by Hiroshi SHIBATA
parent 564ccd095a
commit a42b7de436

View file

@ -981,7 +981,7 @@ strscan_unscan(VALUE self)
}
/*
* Returns +true+ iff the scan pointer is at the beginning of the line.
* Returns +true+ if and only if the scan pointer is at the beginning of the line.
*
* s = StringScanner.new("test\ntest\n")
* s.bol? # => true
@ -1034,7 +1034,7 @@ strscan_empty_p(VALUE self)
}
/*
* Returns true iff there is more data in the string. See #eos?.
* Returns true if and only if there is more data in the string. See #eos?.
* This method is obsolete; use #eos? instead.
*
* s = StringScanner.new('test string')
@ -1051,7 +1051,7 @@ strscan_rest_p(VALUE self)
}
/*
* Returns +true+ iff the last match was successful.
* Returns +true+ if and only if the last match was successful.
*
* s = StringScanner.new('test string')
* s.match?(/\w+/) # => 4