[前][次][番号順一覧][スレッド一覧]

ruby-changes:59604

From: Kazuhiro <ko1@a...>
Date: Fri, 3 Jan 2020 01:28:08 +0900 (JST)
Subject: [ruby-changes:59604] b884eb59eb (master): Fix variable name and add more example [ci skip]

https://git.ruby-lang.org/ruby.git/commit/?id=b884eb59eb

From b884eb59eb22172b5d8af9f33ece093c8f917176 Mon Sep 17 00:00:00 2001
From: Kazuhiro NISHIYAMA <zn@m...>
Date: Fri, 3 Jan 2020 01:26:32 +0900
Subject: Fix variable name and add more example [ci skip]


diff --git a/ast.rb b/ast.rb
index d7e9df8..c507c50 100644
--- a/ast.rb
+++ b/ast.rb
@@ -83,8 +83,10 @@ class RubyVM https://github.com/ruby/ruby/blob/trunk/ast.rb#L83
       #
       #    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
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]