diff options
Diffstat (limited to 'code/extensions')
-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 |