diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-01-21 16:47:23 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-01-21 16:47:23 +0000 |
commit | 002517aba82f3d318dab09f603491417240bfe0f (patch) | |
tree | 552aae90929d0812fd6a5d08e43c870add3a35a5 /eval.c | |
parent | d0149b9e210450113353e9bc8dc1f151f4563313 (diff) | |
download | ruby-002517aba82f3d318dab09f603491417240bfe0f.tar.gz |
* parse.y (newline_node): do not use NODE_NEWLINE node anymore,
use NEWLINE flag instead.
* ext/socket/socket.c (sock_gethostbyname): returns host if
ai_canonname is NULL. (ruby-bugs PR#1243)
* parse.y (block_append): update nd_end for "real" head node.
[ruby-list:39058]
* marshal.c (w_class): should not dump singleton class.
[ruby-dev:22631]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 22 |
1 files changed, 7 insertions, 15 deletions
@@ -2358,10 +2358,6 @@ is_defined(self, node, buf) } break; - case NODE_NEWLINE: - node = node->nd_next; - goto again; - default: PUSH_TAG(PROT_NONE); if ((state = EXEC_TAG()) == 0) { @@ -2468,7 +2464,7 @@ call_trace_func(event, node, self, id, klass) if (id == ID_ALLOCATOR) return; if (!(node_save = ruby_current_node)) { - node_save = NEW_NEWLINE(0); + node_save = NEW_BEGIN(0); } tracing = 1; prev = ruby_frame; @@ -2686,6 +2682,11 @@ rb_eval(self, n) if (!node) RETURN(Qnil); ruby_current_node = node; + if (trace_func && FL_TEST(node, NODE_NEWLINE)) { + call_trace_func("line", node, self, + ruby_frame->last_func, + ruby_frame->last_class); + } switch (nd_type(node)) { case NODE_BLOCK: if (contnode) { @@ -3888,15 +3889,6 @@ rb_eval(self, n) } break; - case NODE_NEWLINE: - if (trace_func) { - call_trace_func("line", node, self, - ruby_frame->last_func, - ruby_frame->last_class); - } - node = node->nd_next; - goto again; - default: rb_bug("unknown node type %d", nd_type(node)); } @@ -6376,7 +6368,7 @@ rb_load(fname, wrap) last_func = ruby_frame->last_func; last_node = ruby_current_node; if (!ruby_current_node && ruby_sourcefile) { - last_node = NEW_NEWLINE(0); + last_node = NEW_BEGIN(0); } ruby_current_node = 0; if (state == 0) { |