summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-09 15:46:45 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-09 15:46:45 +0000
commit7cd9a5d363a74800a5043586e7fc908aaa3e6025 (patch)
tree8947826c6f45d2dba805e83d41a8ebf4db98b10c
parent38828fa8d1d0a072885da81f866e5f5146355a6f (diff)
* node.c (dump_node): fixed for long members.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--node.c14
-rw-r--r--version.h4
3 files changed, 14 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 8cb2ac1e6b3..d0fcab6987e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Dec 10 00:46:43 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * node.c (dump_node): fixed for long members.
+
Wed Dec 9 22:57:04 2009 Yusuke Endoh <mame@tsg.ne.jp>
* node.c: node management added. Currently, only pretty-dumper is
diff --git a/node.c b/node.c
index c4cac9e2d8d..e7d3c4cd34a 100644
--- a/node.c
+++ b/node.c
@@ -18,6 +18,7 @@
#define A_INDENT add_indent(buf, indent)
#define A_ID(id) add_id(buf, id)
#define A_INT(val) rb_str_catf(buf, "%d", (val));
+#define A_LONG(val) rb_str_catf(buf, "%ld", (val));
#define A_LIT(lit) AR(rb_inspect(lit))
#define A_NODE_HEADER(node) \
rb_str_catf(buf, "@ %s (line: %d)", ruby_node_name(nd_type(node)), nd_line(node))
@@ -44,6 +45,7 @@
#define F_ID(name, ann) SIMPLE_FIELD(#name, #name " (" ann ")", A_ID(node->name))
#define F_GENTRY(name, ann) SIMPLE_FIELD(#name, #name " (" ann ")", A_ID((node->name)->id))
#define F_INT(name, ann) SIMPLE_FIELD(#name, #name " (" ann ")", A_INT(node->name))
+#define F_LONG(name, ann) SIMPLE_FIELD(#name, #name " (" ann ")", A_LONG(node->name))
#define F_LIT(name, ann) SIMPLE_FIELD(#name, #name " (" ann ")", A_LIT(node->name))
#define F_MSG(name, ann, desc) SIMPLE_FIELD(#name, #name " (" ann ")", A(desc))
@@ -148,9 +150,9 @@ dump_node(VALUE buf, VALUE indent, int comment, NODE *node)
ANN("until statement");
ANN("format: until [nd_cond]; [nd_body]; end");
ANN("example: until x == 1; foo; end");
- loop:
+ loop:
F_CUSTOM1(nd_state, "begin-end-while?", {
- A_INT(node->nd_state);
+ A_INT((int)node->nd_state);
A((node->nd_state == 1) ? " (while-end)" : " (begin-end-while)");
});
F_NODE(nd_cond, "condition");
@@ -422,7 +424,7 @@ dump_node(VALUE buf, VALUE indent, int comment, NODE *node)
ANN("format: [ [nd_head], [nd_next].. ] (length: [nd_alen])");
ANN("example: return 1, 2, 3");
ary:
- F_INT(nd_alen, "length");
+ F_LONG(nd_alen, "length");
F_NODE(nd_head, "element");
LAST_NODE;
F_NODE(nd_next, "next element");
@@ -489,7 +491,7 @@ dump_node(VALUE buf, VALUE indent, int comment, NODE *node)
ANN("nth special variable reference");
ANN("format: $[nd_nth]");
ANN("example: $1, $2, ..");
- F_CUSTOM1(nd_nth, "variable", { A("$"); A_INT(node->nd_nth); });
+ F_CUSTOM1(nd_nth, "variable", { A("$"); A_LONG(node->nd_nth); });
break;
case NODE_BACK_REF:
@@ -853,7 +855,7 @@ dump_node(VALUE buf, VALUE indent, int comment, NODE *node)
D_NODE_HEADER(node);
ANN("method parameters (cont'd)");
F_ID(nd_pid, "first post argument");
- F_INT(nd_plen, "post argument length");
+ F_LONG(nd_plen, "post argument length");
LAST_NODE;
F_CUSTOM2(nd_next, "aux info 3", {
node = node->nd_next;
@@ -877,7 +879,7 @@ dump_node(VALUE buf, VALUE indent, int comment, NODE *node)
ANN("method parameters");
ANN("format: def method_name(.., [nd_opt=some], *[nd_rest], [nd_pid], .., &[nd_body])");
ANN("example: def foo(a, b, opt1=1, opt2=2, *rest, y, z, &blk); end");
- F_INT(nd_frml, "argc");
+ F_LONG(nd_frml, "argc");
F_NODE(nd_next, "aux info 1");
LAST_NODE;
F_NODE(nd_opt, "optional arguments");
diff --git a/version.h b/version.h
index 7b69f122cb0..d2f1b77a5e9 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.2"
-#define RUBY_RELEASE_DATE "2009-12-09"
+#define RUBY_RELEASE_DATE "2009-12-10"
#define RUBY_PATCHLEVEL -1
#define RUBY_BRANCH_NAME "trunk"
@@ -8,7 +8,7 @@
#define RUBY_VERSION_TEENY 1
#define RUBY_RELEASE_YEAR 2009
#define RUBY_RELEASE_MONTH 12
-#define RUBY_RELEASE_DAY 9
+#define RUBY_RELEASE_DAY 10
#include "ruby/version.h"