rmagick/rmagick — pull request #101 by trbrink (2014-03-21 17:02:56+00:00)
Title: set prefix to empty string if config_string(prefix) is nill

I get the following error when building Rmagick-2.13.2 on Centos 6.4 using Ruby 2.1:

```ruby
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib64
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby
extconf.rb:83:in `check_partial_imagemagick_versions': undefined method `+' for false:FalseClass (NoMethodError)
from extconf.rb:140:in `

'
extconf failed, exit code 1
Gem files will remain installed in /var/www/purchase.stcnet.com/shared/bundle/ruby/gems/rmagick-2.13.2 for inspection.
Results logged to /var/www/purchase.stcnet.com/shared/bundle/ruby/extensions/x86_64-linux/2.1.0/rmagick-2.13.2/gem_make.out
An error occurred while installing rmagick (2.13.2), and Bundler cannot
continue.
Make sure that `gem install rmagick -v '2.13.2'` succeeds before bundling.
```

This pull request sets the prefix variable defined in the `check_partial_imagemagick_versions` method to `""` if `config_string("prefix")` returns false. For me this fixed the build issue.

The same fix was implemented [here](https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20130311/977396.html).