diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/rubygems/test_gem_ext_ext_conf_builder.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/rubygems/test_gem_ext_ext_conf_builder.rb b/test/rubygems/test_gem_ext_ext_conf_builder.rb index 33398ac6f3..dfbf3fe1b9 100644 --- a/test/rubygems/test_gem_ext_ext_conf_builder.rb +++ b/test/rubygems/test_gem_ext_ext_conf_builder.rb @@ -120,8 +120,13 @@ checking for main\(\) in .*?nonexistent/m, error.message) extconf.puts <<-'EXTCONF' include RbConfig -ruby_exe = "#{CONFIG['RUBY_INSTALL_NAME']}#{CONFIG['EXEEXT']}" -ruby = File.join CONFIG['bindir'], ruby_exe +ruby = + if ENV['RUBY'] then + ENV['RUBY'] + else + ruby_exe = "#{CONFIG['RUBY_INSTALL_NAME']}#{CONFIG['EXEEXT']}" + File.join CONFIG['bindir'], ruby_exe + end open 'Makefile', 'w' do |io| io.write <<-Makefile |