Add match test and minor change to match.rb