summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/ruby/language/if_spec.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/ruby/language/if_spec.rb b/spec/ruby/language/if_spec.rb
index 70c847d830..2d1a89f081 100644
--- a/spec/ruby/language/if_spec.rb
+++ b/spec/ruby/language/if_spec.rb
@@ -309,6 +309,7 @@ describe "The if expression" do
it "warns when Integer literals are used instead of predicates" do
-> {
eval <<~RUBY
+ $. = 0
10.times { |i| ScratchPad << i if 4..5 }
RUBY
}.should complain(/warning: integer literal in flip-flop/, verbose: true)