about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-24 02:05:39 +0200
committerhut <hut@lavabit.com>2009-07-24 02:05:39 +0200
commit88c8e231932041e0d34bb6d40eeb1e627048ad76 (patch)
tree4a1954479d4b4d648a133df051d255962cb80037
parentcaf93a12841e8a001c338045c7e17ed0622ec8ce (diff)
downloadranger-88c8e231932041e0d34bb6d40eeb1e627048ad76.tar.gz
nil <=> x results in 0
-rw-r--r--code/extensions/basic.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/code/extensions/basic.rb b/code/extensions/basic.rb
index 5244a459..f7626ee9 100644
--- a/code/extensions/basic.rb
+++ b/code/extensions/basic.rb
@@ -165,6 +165,12 @@ class File::Stat
 end
 
 
-class Object;   def or(value) self  end end
-class NilClass; def or(value) value end end
+class Object
+	def or(value) self end
+end
+
+class NilClass
+	def or(value) value end
+	def <=>(value) 0 end
+end