1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fix variable name and add more example [ci skip]

This commit is contained in:
Kazuhiro NISHIYAMA 2020-01-03 01:26:32 +09:00
parent db22b36862
commit b884eb59eb
No known key found for this signature in database
GPG key ID: 262ED8DBB4222F7A

6
ast.rb
View file

@ -83,8 +83,10 @@ class RubyVM
# #
# root = RubyVM::AbstractSyntaxTree.parse("x = 1 + 2") # root = RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
# root.type # => :SCOPE # root.type # => :SCOPE
# call = root.children[2] # lasgn = root.children[2]
# call.type # => :LASGN # lasgn.type # => :LASGN
# call = lasgn.children[1]
# call.type # => :OPCALL
def type def type
__builtin_ast_node_type __builtin_ast_node_type
end end