summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-10-04 12:15:27 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-10-04 12:16:31 +0900
commit28392d30451bbf13cdacf6b745eb4f5147741bdf (patch)
treebf49a105ca844d77d4b01f248fb5c5bd27d3ebfe /test
parentda139317a59acb2d79f460bf92331450efa310fe (diff)
The same warning for static symbol literal
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_syntax.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index bf59ee5379..667eb205dc 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -1061,16 +1061,16 @@ eom
end
def test_warning_literal_in_condition
- assert_warn(/literal in condition/) do
+ assert_warn(/string literal in condition/) do
eval('1 if ""')
end
- assert_warn(/literal in condition/) do
+ assert_warn(/regex literal in condition/) do
eval('1 if //')
end
assert_warning(/literal in condition/) do
eval('1 if 1')
end
- assert_warning(/literal in condition/) do
+ assert_warning(/symbol literal in condition/) do
eval('1 if :foo')
end
assert_warning(/symbol literal in condition/) do