Created
January 27, 2011 08:53
-
-
Save anonymous/798256 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/ruby/site_ruby/1.8/rubygems/config_file.rb b/lib/ruby/site_ruby/1.8/rubygems/config_file.rb | |
index 7eb755a..be6f3da 100644 | |
--- a/lib/ruby/site_ruby/1.8/rubygems/config_file.rb | |
+++ b/lib/ruby/site_ruby/1.8/rubygems/config_file.rb | |
@@ -44,6 +44,15 @@ class Gem::ConfigFile | |
# rubygems/defaults/#{RUBY_ENGINE}.rb | |
PLATFORM_DEFAULTS = {} | |
+ | |
+ require 'ffi' | |
+ class XYZ | |
+ def initialize | |
+ @lib = FFI::DynamicLibrary.open('/usr/lib/libc.dylib', FFI::DynamicLibrary::RTLD_LAZY | FFI::DynamicLibrary::RTLD_GLOBAL) | |
+ sym = @lib.find_function('fork') | |
+ @func = FFI::Function.new(FFI::Type::INT, [], sym) | |
+ end | |
+ end | |
system_config_path = | |
begin | |
@@ -63,6 +72,7 @@ class Gem::ConfigFile | |
path.strip | |
rescue LoadError | |
+ YumYumYum = XYZ.new | |
'/etc' | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment