Skip to content

Commit

Permalink
Fixed a comment [ci skip]
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nobu committed Aug 29, 2019
1 parent 1cf5a31 commit d3e0bc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/ruby/language/precedence_spec.rb
Expand Up @@ -300,7 +300,7 @@ class FalseClass; undef_method :=~; end
# 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
Expand Down

0 comments on commit d3e0bc0

Please sign in to comment.