diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-04 07:50:15 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-04 07:50:15 +0000 |
commit | 9ad065375f171ea37979d31ef725323b3b7414e9 (patch) | |
tree | 3e597133eb72db00bccacd7ff4f9d4d4856be59b /parse.y | |
parent | 2c2cf71b048e42950d5d5f79fe78bc9fea0df158 (diff) | |
download | ruby-9ad065375f171ea37979d31ef725323b3b7414e9.tar.gz |
* parse.y (k_def): adjust the location of method definition to the
line of def. [Bug #2427]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -2902,7 +2902,7 @@ primary : literal NODE *body = remove_begin($5); reduce_nodes(&body); $$ = NEW_DEFN($2, $4, body, NOEX_PRIVATE); - fixpos($$, $4); + nd_set_line($$, $<num>1); /*% $$ = dispatch3(def, $2, $4, $5); %*/ @@ -2924,7 +2924,7 @@ primary : literal NODE *body = remove_begin($8); reduce_nodes(&body); $$ = NEW_DEFS($2, $5, $7, body); - fixpos($$, $2); + nd_set_line($$, $<num>1); /*% $$ = dispatch5(defs, $2, $3, $5, $7, $8); %*/ @@ -3034,6 +3034,10 @@ k_module : keyword_module k_def : keyword_def { token_info_push("def"); + /*%%%*/ + $<num>$ = ruby_sourceline; + /*% + %*/ } ; |