summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-30 09:54:21 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-30 11:49:40 +0900
commit5f736d431951baa2c6e5113322092f7f85d03ae4 (patch)
treeac5e4e15123195fcb183eae213fd84c6ceba3649
parent4a063546e7de9ddb424fdf822e69bb3ffeb50631 (diff)
Suppress "literal in condition" warnings
-rw-r--r--test/ruby/test_ast.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ruby/test_ast.rb b/test/ruby/test_ast.rb
index aca9313529..ee9c1ddc00 100644
--- a/test/ruby/test_ast.rb
+++ b/test/ruby/test_ast.rb
@@ -286,11 +286,11 @@ class TestAst < Test::Unit::TestCase
end
def test_while
- node = RubyVM::AbstractSyntaxTree.parse('1 while 1')
+ node = RubyVM::AbstractSyntaxTree.parse('1 while qux')
_, _, body = *node.children
assert_equal(:WHILE, body.type)
type1 = body.children[2]
- node = RubyVM::AbstractSyntaxTree.parse('begin 1 end while 1')
+ node = RubyVM::AbstractSyntaxTree.parse('begin 1 end while qux')
_, _, body = *node.children
assert_equal(:WHILE, body.type)
type2 = body.children[2]
@@ -298,11 +298,11 @@ class TestAst < Test::Unit::TestCase
end
def test_until
- node = RubyVM::AbstractSyntaxTree.parse('1 until 1')
+ node = RubyVM::AbstractSyntaxTree.parse('1 until qux')
_, _, body = *node.children
assert_equal(:UNTIL, body.type)
type1 = body.children[2]
- node = RubyVM::AbstractSyntaxTree.parse('begin 1 end until 1')
+ node = RubyVM::AbstractSyntaxTree.parse('begin 1 end until qux')
_, _, body = *node.children
assert_equal(:UNTIL, body.type)
type2 = body.children[2]