test $RUBY || export RUBY=ruby export PWD=`pwd` export RUBYLEXERVSRUBY="$RUBY -Ilib test/code/rubylexervsruby.rb" if $RUBY --version|grep '^ruby 1\.6'; then echo 'error: need ruby 1.8'; exit fi mkdir test/results ruby < test/results/rubyscripts.txt require 'open3' binfiles=ENV['PATH'].split(':').map{|dir| Dir[dir+'/*']}.compact rubyscripts=[] Open3.popen3('file -f -'){|cin,cout,cerr| cin.puts *binfiles cin.flush cin.close cout.each{|line| name=line[/\A([^:]+):.*ruby.*text/i,1] and rubyscripts<