lib/rake/extensiontask.rb in luislavena-rake-compiler-0.2.1 vs lib/rake/extensiontask.rb in luislavena-rake-compiler-0.3.0
- old
+ new
@@ -198,10 +198,10 @@
end
end
def define_cross_platform_tasks
config_path = File.expand_path("~/.rake-compiler/config.yml")
- major_ver = RUBY_VERSION.match(/(\d+.\d+)/)[1]
+ major_ver = (ENV['RUBY_CC_VERSION'] || RUBY_VERSION).match(/(\d+.\d+)/)[1]
# warn the user about the need of configuration to use cross compilation.
unless File.exist?(config_path)
warn "rake-compiler must be configured first to enable cross-compilation"
return