diff options
| author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-23 07:15:49 +0000 |
|---|---|---|
| committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-23 07:15:49 +0000 |
| commit | dcb7270d7e2fb0036afcc421b63be32a7732a9a1 (patch) | |
| tree | 7f6e4ca05ec337381bc48d371f14e37095d8669b /parse.y | |
| parent | 3127da3067b32cf2c4cfb37b5d0eec405344a3f7 (diff) | |
| download | ruby-dcb7270d7e2fb0036afcc421b63be32a7732a9a1.tar.gz ruby-dcb7270d7e2fb0036afcc421b63be32a7732a9a1.tar.xz ruby-dcb7270d7e2fb0036afcc421b63be32a7732a9a1.zip | |
* parse.y (primary): fix lineno of rescue and ensure.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
| -rw-r--r-- | parse.y | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -2448,10 +2448,15 @@ primary : literal kEND { /*%%%*/ - if ($3 == NULL) + if ($3 == NULL) { $$ = NEW_NIL(); - else + } + else { + if (nd_type($3) == NODE_RESCUE || + nd_type($3) == NODE_ENSURE) + nd_set_line($3, $<num>1); $$ = NEW_BEGIN($3); + } nd_set_line($$, $<num>1); /*% $$ = dispatch1(begin, $3); |
