ruby-changes:55771
From: Nobuyoshi <ko1@a...>
Date: Wed, 22 May 2019 16:33:21 +0900 (JST)
Subject: [ruby-changes:55771] Nobuyoshi Nakada: 4d93340d38 (trunk): ast.c: update inspect results in the documents
https://git.ruby-lang.org/ruby.git/commit/?id=4d93340d38 From 4d93340d3836bc454cee0c74715a412d090ff178 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 22 May 2019 16:33:03 +0900 Subject: ast.c: update inspect results in the documents diff --git a/ast.c b/ast.c index 2d21909..a1af214 100644 --- a/ast.c +++ b/ast.c @@ -83,7 +83,7 @@ ast_parse_done(rb_ast_t *ast) https://github.com/ruby/ruby/blob/trunk/ast.c#L83 * SyntaxError is raised if the given _string_ is invalid syntax. * * RubyVM::AbstractSyntaxTree.parse("x = 1 + 2") - * # => #<RubyVM::AbstractSyntaxTree::Node(NODE_SCOPE(0) 1:0, 1:9): > + * # => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-1:9> */ static VALUE rb_ast_s_parse(VALUE module, VALUE str) @@ -112,7 +112,7 @@ rb_ast_parse_str(VALUE str) https://github.com/ruby/ruby/blob/trunk/ast.c#L112 * valid Ruby syntax. * * RubyVM::AbstractSyntaxTree.parse_file("my-app/app.rb") - * # => #<RubyVM::AbstractSyntaxTree::Node(NODE_SCOPE(0) 1:0, 31:3): > + * # => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-31:3> */ static VALUE rb_ast_s_parse_file(VALUE module, VALUE path) @@ -208,14 +208,14 @@ script_lines(VALUE path) https://github.com/ruby/ruby/blob/trunk/ast.c#L208 * Returns AST nodes of the given _proc_ or _method_. * * RubyVM::AbstractSyntaxTree.of(proc {1 + 2}) - * # => #<RubyVM::AbstractSyntaxTree::Node(NODE_SCOPE(0) 1:35, 1:42): > + * # => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:35-1:42> * * def hello * puts "hello, world" * end * * RubyVM::AbstractSyntaxTree.of(method(:hello)) - * # => #<RubyVM::AbstractSyntaxTree::Node(NODE_SCOPE(0) 1:0, 3:3): > + * # => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-3:3> */ static VALUE rb_ast_s_of(VALUE module, VALUE body) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/