aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_pp.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-30 09:51:09 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-30 11:49:40 +0900
commit3620568d3ac0533b050985d7c3c4ca871d464fd6 (patch)
treeac24bfba224e8c5b0db57e53811486a7adbc3239 /test/test_pp.rb
parentc400c0b4a00706a0da33664c1898e15f1aba0eec (diff)
downloadruby-3620568d3ac0533b050985d7c3c4ca871d464fd6.tar.gz
Suppress void context warnings in verbose mode
Diffstat (limited to 'test/test_pp.rb')
-rw-r--r--test/test_pp.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_pp.rb b/test/test_pp.rb
index d0104651ea..4736bff149 100644
--- a/test/test_pp.rb
+++ b/test/test_pp.rb
@@ -196,9 +196,9 @@ end
class PPAbstractSyntaxTree < Test::Unit::TestCase
AST = RubyVM::AbstractSyntaxTree
- def test_literal
- ast = AST.parse("1")
- expected = "(SCOPE@1:0-1:1 tbl: [] args: nil body: (LIT@1:0-1:1 1))"
+ def test_lasgn_literal
+ ast = AST.parse("_=1")
+ expected = "(SCOPE@1:0-1:3 tbl: [:_] args: nil body: (LASGN@1:0-1:3 :_ (LIT@1:2-1:3 1)))"
assert_equal(expected, PP.singleline_pp(ast, ''.dup), ast)
end
end