Created
June 1, 2009 15:18
-
-
Save braveulysses/121478 to your computer and use it in GitHub Desktop.
Patch to run cheat with Ruby 1.9.1
This file contains 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
--- /opt/local/lib/ruby1.9/gems/1.9.1/gems/cheat-1.2.1/lib/cheat.rb 2009-06-01 10:30:32.000000000 -0500 | |
+++ cheat.rb 2009-06-01 10:30:19.000000000 -0500 | |
@@ -1,5 +1,10 @@ | |
$:.unshift File.dirname(__FILE__) | |
%w[rubygems tempfile fileutils net/http yaml open-uri wrap].each { |f| require f } | |
+begin | |
+ PLATFORM = RUBY_PLATFORM | |
+rescue NameError | |
+ # ... then we're probably using Ruby < 1.9 | |
+end | |
module Cheat | |
extend self | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment