From 47d28550fe665941b2f61ba6f2bb86e252e9768d Mon Sep 17 00:00:00 2001 From: Mat Brown Date: Mon, 25 Mar 2013 10:42:01 -0400 Subject: [PATCH] Make sure to use correct major version directory --- lib/ruby_core_source.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ruby_core_source.rb b/lib/ruby_core_source.rb index 38c2faa..2910527 100755 --- a/lib/ruby_core_source.rb +++ b/lib/ruby_core_source.rb @@ -31,6 +31,7 @@ def create_makefile_with_core(hdrs, name) else ruby_dir = "ruby-" + RUBY_VERSION.to_s + "-p" + RUBY_PATCHLEVEL.to_s end + major_version = RUBY_VERSION.to_s[/^\d+\.\d+/] # # Check if core headers were already downloaded; if so, use them @@ -54,10 +55,11 @@ def create_makefile_with_core(hdrs, name) FileUtils.mkdir_p(dest_dir) end + # # Download the headers # - uri_path = "http://ftp.ruby-lang.org/pub/ruby/1.9/" + ruby_dir + ".tar.gz" + uri_path = "http://ftp.ruby-lang.org/pub/ruby/#{major_version}/#{ruby_dir}.tar.gz" Tempfile.open("ruby-src") { |temp| temp.binmode