diff options
Diffstat (limited to 'ext/ripper/extconf.rb')
-rw-r--r-- | ext/ripper/extconf.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/ripper/extconf.rb b/ext/ripper/extconf.rb index 6a793b8699..2dde565bd9 100644 --- a/ext/ripper/extconf.rb +++ b/ext/ripper/extconf.rb @@ -5,7 +5,9 @@ require 'mkmf' require 'rbconfig' def main - unless find_executable(ENV["YACC"] || 'bison') + yacc = ENV["YACC"] || "bison" + + unless find_executable(yacc) unless File.exist?('ripper.c') or File.exist?("#{$srcdir}/ripper.c") raise 'missing bison; abort' end @@ -17,7 +19,7 @@ def main $VPATH << '$(topdir)' << '$(top_srcdir)' $INCFLAGS << ' -I$(topdir) -I$(top_srcdir)' create_makefile 'ripper' do |conf| - conf << "BISON = #{ENV['YACC'] || 'bison'}" + conf << "BISON = #{yacc}" end end |