Skip to content

Instantly share code, notes, and snippets.

@nuna
Created August 24, 2011 15:41
Show Gist options
  • Save nuna/1168336 to your computer and use it in GitHub Desktop.
Save nuna/1168336 to your computer and use it in GitHub Desktop.
patch for ruby-1.9.2-p290
Index: ruby-1.9.2-p290/tool/rbinstall.rb
===================================================================
--- ruby-1.9.2-p290.orig/tool/rbinstall.rb
+++ ruby-1.9.2-p290/tool/rbinstall.rb
@@ -491,38 +491,6 @@
end
end
-install?(:ext, :comm, :gem) do
- directories = []
- IO.foreach(File.join(srcdir, "lib/rubygems.rb")) do |line|
- if /^\s*DIRECTORIES\s*=\s*%w\[(.*?)\]/ =~ line
- directories = $1.split
- break
- end
- end
- gpath = CONFIG["sitelibdir"].sub(%r'/site_ruby/(?=[^/]+)', '/gems/')
- prepare "default gems", gpath, directories
-
- destdir = File.join(gpath, directories.grep(/^spec/)[0])
- default_gems = [
- ['rdoc', 'rdoc.rb'],
- ['minitest', 'minitest/unit.rb'],
- ]
- default_gems.each do |name, src|
- src = File.join(srcdir, "lib", src)
- version = open(src) {|f| f.find {|s| /^\s*\w*VERSION\s*=(?!=)/ =~ s}} or next
- version = version.split(%r"=\s*", 2)[1].strip[/\A([\'\"])(.*?)\1/, 2]
- puts "#{" "*30}#{name} #{version}"
- gemspec = <<-GEMSPEC
-Gem::Specification.new do |s|
- s.name = #{name.dump}
- s.version = #{version.dump}
- s.summary = "This #{name} is bundled with Ruby"
-end
- GEMSPEC
- open_for_install(File.join(destdir, "#{name}-#{version}.gemspec"), $data_mode) { gemspec }
- end
-end
-
parse_args()
include FileUtils
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment