Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/ruby_core_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down