diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-24 01:56:21 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-24 01:56:21 +0000 |
commit | 04994454fdf21e59b88f65f57e8f44e57bfa4b07 (patch) | |
tree | 7a65055ae1359460a8d10f689c46a20cb4b74cd7 /ast.c | |
parent | d747ecc0c41a7a138c0ae6112356707725653a3e (diff) |
Compact AST::Node#inspect
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ast.c')
-rw-r--r-- | ast.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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; } |