Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Verify that the ruby to build with is the one it was configured with

  • Loading branch information...
commit a5aff42b9e5b33aceb30514788cdadf5fdb8e5af 1 parent 8b591e7
@dbussink dbussink authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 Rakefile
View
10 Rakefile
@@ -33,6 +33,16 @@ unless BUILD_CONFIG[:which_ruby] == :ruby or BUILD_CONFIG[:which_ruby] == :rbx
exit 1
end
+bin = RbConfig::CONFIG["RUBY_INSTALL_NAME"] || RbConfig::CONFIG["ruby_install_name"]
+bin << (RbConfig::CONFIG['EXEEXT'] || RbConfig::CONFIG['exeext'] || '')
+build_ruby = File.join(RbConfig::CONFIG['bindir'], bin)
+
+unless BUILD_CONFIG[:build_ruby] == build_ruby
+ STDERR.puts "Sorry, but you need to build with the same Ruby version it was configured with"
+ STDERR.puts "Please run ./configure again"
+ exit 1
+end
+
$dlext = RbConfig::CONFIG["DLEXT"]
task :default => %w[build vm:test] do
Please sign in to comment.
Something went wrong with that request. Please try again.