summaryrefslogtreecommitdiffhomepage
path: root/mrblib/compar.rb
diff options
context:
space:
mode:
Diffstat (limited to 'mrblib/compar.rb')
-rw-r--r--mrblib/compar.rb63
1 files changed, 63 insertions, 0 deletions
diff --git a/mrblib/compar.rb b/mrblib/compar.rb
new file mode 100644
index 000000000..974ad5036
--- /dev/null
+++ b/mrblib/compar.rb
@@ -0,0 +1,63 @@
+### move to compar.c
+# module Comparable
+ # def == other
+ # cmp = self <=> other
+ # if cmp == 0
+ # true
+ # else
+ # false
+ # end
+ # end
+
+ # def < other
+ # cmp = self <=> other
+ # if cmp.nil?
+ # false
+ # elsif cmp < 0
+ # true
+ # else
+ # false
+ # end
+ # end
+
+ # def <= other
+ # cmp = self <=> other
+ # if cmp.nil?
+ # false
+ # elsif cmp <= 0
+ # true
+ # else
+ # false
+ # end
+ # end
+
+ # def > other
+ # cmp = self <=> other
+ # if cmp.nil?
+ # false
+ # elsif cmp > 0
+ # true
+ # else
+ # false
+ # end
+ # end
+
+ # def >= other
+ # cmp = self <=> other
+ # if cmp.nil?
+ # false
+ # elsif cmp >= 0
+ # true
+ # else
+ # false
+ # end
+ # end
+
+ # def between?(min,max)
+ # if self < min or self > max
+ # false
+ # else
+ # true
+ # end
+ # end
+# end