From e0d6430f63c4cbe0c71ce82ee23284671389a818 Mon Sep 17 00:00:00 2001 From: mimaki Date: Fri, 20 Apr 2012 09:39:03 +0900 Subject: add mruby sources --- mrblib/compar.rb | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 mrblib/compar.rb (limited to 'mrblib/compar.rb') 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 -- cgit v1.2.3