Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

abi-checker.rb now supports --skip-symbols #3

Merged
merged 1 commit into from
Jul 26, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions abi-checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
classext.h
Expand Down Expand Up @@ -63,6 +60,18 @@
</libs>
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
Expand Down