зеркало из https://github.com/github/ruby.git
Fixed a comment [ci skip]
A range literal in conditional expression is turned into a flip-flop, as a Range object is never falsy and does not make a sense.
This commit is contained in:
Родитель
1cf5a31e7a
Коммит
d3e0bc07e2
|
@ -300,7 +300,7 @@ describe "Operators" do
|
|||
# Use variables to avoid warnings
|
||||
from = 1
|
||||
to = 2
|
||||
# These are Range instances, not flip-flop
|
||||
# These are flip-flop, not Range instances
|
||||
(from..to ? 3 : 4).should == 3
|
||||
(from...to ? 3 : 4).should == 3
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче