Skip to content

Instantly share code, notes, and snippets.

@patshaughnessy
Created February 23, 2012 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patshaughnessy/1894412 to your computer and use it in GitHub Desktop.
Save patshaughnessy/1894412 to your computer and use it in GitHub Desktop.
def cripple_rubygems(specs)
reverse_rubygems_kernel_mixin
executables = specs.map { |s| s.executables }.flatten
Gem.source_index # ensure RubyGems is fully loaded
::Kernel.send(:define_method, :gem) do |dep, *reqs|
...etc...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment