Skip to content

Instantly share code, notes, and snippets.

@braveulysses
Created June 1, 2009 15:18
Show Gist options
  • Save braveulysses/121478 to your computer and use it in GitHub Desktop.
Save braveulysses/121478 to your computer and use it in GitHub Desktop.
Patch to run cheat with Ruby 1.9.1
--- /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