diff options
author | hut <hut@lavabit.com> | 2009-07-24 02:05:39 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-07-24 02:05:39 +0200 |
commit | 88c8e231932041e0d34bb6d40eeb1e627048ad76 (patch) | |
tree | 4a1954479d4b4d648a133df051d255962cb80037 | |
parent | caf93a12841e8a001c338045c7e17ed0622ec8ce (diff) | |
download | ranger-88c8e231932041e0d34bb6d40eeb1e627048ad76.tar.gz |
nil <=> x results in 0
-rw-r--r-- | code/extensions/basic.rb | 10 |
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 |