From bba491612283e5e2b3a05f578350f84ce02274bc Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Fri, 3 Jan 2020 00:02:28 +0900 Subject: [PATCH] Fix example of node.type [ci skip] ``` % docker run -it --rm rubylang/all-ruby env ALL_RUBY_SINCE=ruby-2.6 ./all-ruby -e 'root = RubyVM::AbstractSyntaxTree.parse("x = 1 + 2") p [root, root.type] call = root.children[2] p [call, call.type] ' ruby-2.6.0 [#, :SCOPE] [#, :LASGN] ... ruby-2.7.0 [#, :SCOPE] [#, :LASGN] ``` --- ast.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ast.rb b/ast.rb index 1fedf76649..d7e9df8678 100644 --- a/ast.rb +++ b/ast.rb @@ -84,7 +84,7 @@ class RubyVM # root = RubyVM::AbstractSyntaxTree.parse("x = 1 + 2") # root.type # => :SCOPE # call = root.children[2] - # call.type # => :OPCALL + # call.type # => :LASGN def type __builtin_ast_node_type end