ruby-changes:56291
From: Nobuyoshi <ko1@a...>
Date: Sun, 30 Jun 2019 19:23:50 +0900 (JST)
Subject: [ruby-changes:56291] Nobuyoshi Nakada: 5f736d4319 (trunk): Suppress "literal in condition" warnings
https://git.ruby-lang.org/ruby.git/commit/?id=5f736d4319 From 5f736d431951baa2c6e5113322092f7f85d03ae4 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 30 Jun 2019 09:54:21 +0900 Subject: Suppress "literal in condition" warnings diff --git a/test/ruby/test_ast.rb b/test/ruby/test_ast.rb index aca9313..ee9c1dd 100644 --- a/test/ruby/test_ast.rb +++ b/test/ruby/test_ast.rb @@ -286,11 +286,11 @@ class TestAst < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_ast.rb#L286 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 https://github.com/ruby/ruby/blob/trunk/test/ruby/test_ast.rb#L298 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] -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/