summaryrefslogtreecommitdiff
path: root/node.c
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2021-11-17 23:38:19 +0900
committerYusuke Endoh <mame@ruby-lang.org>2021-11-17 23:38:19 +0900
commit5a7b4dba26e29f5942265267688625b5be174064 (patch)
treecabf8212ceee72e91480e001b532f8a89cc357a2 /node.c
parentc400165afaca06dcff06d980c8f7fe46ff3904e4 (diff)
node.c (dump_node): trivial refactoring
Diffstat (limited to 'node.c')
-rw-r--r--node.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/node.c b/node.c
index cd1c3f0b0a..548e4f9fe1 100644
--- a/node.c
+++ b/node.c
@@ -677,10 +677,8 @@ dump_node(VALUE buf, VALUE indent, int comment, const NODE * node)
ANN("format: $[nd_nth]");
ANN("example: $&, $`, $', $+");
F_CUSTOM1(nd_nth, "variable") {
- char name[3];
- name[0] = '$';
+ char name[3] = "$ ";
name[1] = (char)node->nd_nth;
- name[2] = '\0';
A(name);
}
return;