Skip to content

Commit

Permalink
* parse.y (do_block, brace_block): fix line numbers. [ruby-dev:30831]
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Jun 10, 2007
1 parent 5dc9bf1 commit 30dbd2a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Sun Jun 10 16:59:39 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>

* parse.y (do_block, brace_block): fix line numbers. [ruby-dev:30831]

Sun Jun 10 16:57:20 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>

* instruby.rb (install_recursive): add :glob option rather than
Expand Down
14 changes: 7 additions & 7 deletions parse.y
Original file line number Diff line number Diff line change
Expand Up @@ -2516,7 +2516,7 @@ primary : literal
| keyword_begin
{
/*%%%*/
$<num>1 = ruby_sourceline;
$<num>$ = ruby_sourceline;
/*%
%*/
}
Expand All @@ -2530,10 +2530,10 @@ primary : literal
else {
if (nd_type($3) == NODE_RESCUE ||
nd_type($3) == NODE_ENSURE)
nd_set_line($3, $<num>1);
nd_set_line($3, $<num>2);
$$ = NEW_BEGIN($3);
}
nd_set_line($$, $<num>1);
nd_set_line($$, $<num>2);
/*%
$$ = dispatch1(begin, $3);
%*/
Expand Down Expand Up @@ -3292,7 +3292,7 @@ do_block : keyword_do_block
{
/*%%%*/
dyna_push();
$<num>1 = ruby_sourceline;
$<num>$ = ruby_sourceline;
/*% %*/
}
opt_block_param
Expand All @@ -3301,7 +3301,7 @@ do_block : keyword_do_block
{
/*%%%*/
$$ = NEW_ITER($3,$4);
nd_set_line($$, $<num>1);
nd_set_line($$, $<num>2);
dyna_pop();
/*%
$$ = dispatch2(do_block, escape_Qundef($3), $5);
Expand Down Expand Up @@ -3433,7 +3433,7 @@ brace_block : '{'
{
/*%%%*/
dyna_push();
$<num>1 = ruby_sourceline;
$<num>$ = ruby_sourceline;
/*% %*/
}
opt_block_param
Expand All @@ -3451,7 +3451,7 @@ brace_block : '{'
{
/*%%%*/
dyna_push();
$<num>1 = ruby_sourceline;
$<num>$ = ruby_sourceline;
/*% %*/
}
opt_block_param
Expand Down

0 comments on commit 30dbd2a

Please sign in to comment.