Skip to content

Commit

Permalink
* parse.y (lambda): add ripper event. This fixes bus error on "make t…
Browse files Browse the repository at this point in the history
…est-all".

* ext/ripper/extconf.rb: do not stop build.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
aamine committed Feb 23, 2007
1 parent 606734f commit 67c94ca
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Fri Feb 23 12:24:46 2007 Minero Aoki <aamine@loveruby.net>

* parse.y (lambda): add ripper event. This fixes bus error on
"make test-all".

* ext/ripper/extconf.rb: do not stop build.

Fri Feb 23 12:16:05 2007 Yukihiro Matsumoto <matz@ruby-lang.org>

* parse.y: remove dyna_check_gen() prototype.
Expand Down
3 changes: 0 additions & 3 deletions ext/ripper/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
require 'rbconfig'

def main
Logging.message "YARV doesn't support Ripper"
return

unless find_executable('bison')
unless File.exist?('ripper.c') or File.exist?("#{$srcdir}/ripper.c")
Logging.message 'missing bison; abort'
Expand Down
21 changes: 11 additions & 10 deletions parse.y
Original file line number Diff line number Diff line change
Expand Up @@ -3208,29 +3208,30 @@ bvar : tIDENTIFIER
}
;

lambda : {
lambda : {
/*%%%*/
dyna_push();
$<num>$ = lpar_beg;
lpar_beg = ++paren_nest;
/*%
%*/
}
{
$<num>$ = lpar_beg;
lpar_beg = ++paren_nest;
}
f_larglist
{
$<num>$ = vtable_size(lvtbl->dvars);
/*%%%*/
$<num>$ = vtable_size(lvtbl->dvars);
/*%
%*/
}
lambda_body
{
/*%%%*/
$$ = $3;
$$->nd_body = block_append($$->nd_body, $5);
$$ = $2;
$$->nd_body = block_append($$->nd_body, $4);
dyna_pop();
lpar_beg = $<num>2;
lpar_beg = $<num>1;
/*%
$$ = dispatch2(lambda, $3, $5);
$$ = dispatch2(lambda, $2, $4);
%*/
}
;
Expand Down

0 comments on commit 67c94ca

Please sign in to comment.