mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
Fix variable name and add more example [ci skip]
This commit is contained in:
parent
db22b36862
commit
b884eb59eb
6
ast.rb
6
ast.rb
@ -83,8 +83,10 @@ class RubyVM
|
||||
#
|
||||
# root = RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
|
||||
# root.type # => :SCOPE
|
||||
# call = root.children[2]
|
||||
# call.type # => :LASGN
|
||||
# lasgn = root.children[2]
|
||||
# lasgn.type # => :LASGN
|
||||
# call = lasgn.children[1]
|
||||
# call.type # => :OPCALL
|
||||
def type
|
||||
__builtin_ast_node_type
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user