diff --git a/abi-checker.rb b/abi-checker.rb index b7779e5c..a95a55fa 100644 --- a/abi-checker.rb +++ b/abi-checker.rb @@ -29,10 +29,7 @@ # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. require 'tempfile' - -if ARGV.size < 2 then - puts "usage: abi-checker path-to-old-ruby path-to-new-ruby" -end +require "optparse" skip_headers = < END +opts = OptionParser.new +opts.on("--skip-symbols FILE") {|f| + # If --skip-symbols is specified, they are skipped too. + skip_symbols += File.open(f).read +} +opts.parse!(ARGV) + +if ARGV.size < 2 then + puts "usage: abi-checker [--skip-symbols FILE] path-to-old-ruby path-to-new-ruby" +end + + sh_file = Tempfile.open("skip-headers") sh_file.write(skip_headers) sh_file.flush