diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-26 13:47:01 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-26 13:47:01 +0000 |
| commit | 3393a544a3e5ddaf3cfa3750ac947c2513425d2e (patch) | |
| tree | 976a8b15651da7538c6e624bf56f07aeba99d84e /parse.y | |
| parent | f5427d28f240aa1c0426b7cc8e05b13eeb961490 (diff) | |
| download | ruby-3393a544a3e5ddaf3cfa3750ac947c2513425d2e.tar.gz ruby-3393a544a3e5ddaf3cfa3750ac947c2513425d2e.tar.xz ruby-3393a544a3e5ddaf3cfa3750ac947c2513425d2e.zip | |
* parse.y (primary, brace_block): fix for line number.
* proc.c (rb_proc_location, rb_method_location): new methods
{Proc,Method,UnboundMethod}#source_location. [ruby-core:18452]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
| -rw-r--r-- | parse.y | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2886,6 +2886,7 @@ primary : literal reduce_nodes(&body); $$ = NEW_DEFN($2, $4, body, NOEX_PRIVATE); fixpos($$, $4); + fixpos($$->nd_defn, $4); local_pop(); in_def--; cur_mid = $<id>3; @@ -2913,6 +2914,7 @@ primary : literal reduce_nodes(&body); $$ = NEW_DEFS($2, $5, $7, body); fixpos($$, $2); + fixpos($$->nd_defn, $2); local_pop(); in_single--; /*% @@ -3611,6 +3613,8 @@ brace_block : '{' /*%%%*/ $$ = NEW_ITER($3,$4); nd_set_line($$, $<num>2); + nd_set_line($$->nd_body, $<num>2); + nd_set_line($$->nd_body->nd_body, $<num>2); dyna_pop(); /*% $$ = dispatch2(brace_block, escape_Qundef($3), $4); |
