mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Compact AST::Node#inspect
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d747ecc0c4
commit
04994454fd
1 changed files with 4 additions and 3 deletions
7
ast.c
7
ast.c
|
@ -721,9 +721,10 @@ rb_ast_node_inspect(VALUE self)
|
|||
str = rb_str_new2("#<");
|
||||
|
||||
rb_str_append(str, cname);
|
||||
rb_str_cat2(str, "(");
|
||||
rb_str_catf(str, "%s(%d) %d:%d, %d:%d", node_type_to_str(data->node), nd_type(data->node), nd_first_lineno(data->node), nd_first_column(data->node), nd_last_lineno(data->node), nd_last_column(data->node));
|
||||
rb_str_cat2(str, "): >");
|
||||
rb_str_catf(str, ":%s@%d:%d-%d:%d>",
|
||||
node_type_to_str(data->node),
|
||||
nd_first_lineno(data->node), nd_first_column(data->node),
|
||||
nd_last_lineno(data->node), nd_last_column(data->node));
|
||||
|
||||
return str;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue