Combined with https://github.com/Homebrew/homebrew-test-bot/pull/247
this will test Homebrew's use of frozen strings in CI. After this we
will then enable it for Homebrew developers and eventually all Homebrew
users.
When the DBM database cannot be read by the current version of Ruby's
DBM library (due to corruption or another incompatibility) it segfaults
or freezes which takes down the entire Homebrew Ruby process.
This isn't desirable so instead perform a shell out with the Homebrew
Ruby to see if it can read the DBM database before we try to use the
information. If this hangs or crashes: silently delete the database and
recreate it.
This avoids `brew style` and friends from getting upset when they
attempt to use the native gem extensions from a previous portable Ruby
or a system Ruby.
ABI? What's that?
- Rather than checking for the absence of a failure check for an actual success in the check
- Fix the check to work on Ruby 1.9 (where `RUBY_VERSION.to_s.dup` is required to avoid modifying a frozen string).
Not quite a mass replacement as I've used OS X and Mac OS X where
describing specific older versions and added compatibility methods
for things in the DSL.