Project

General

Profile

Feature #5899

Updated by nobu (Nobuyoshi Nakada) over 8 years ago

Migration from python to ruby is problematic because ruby lacks certain features. 
 Most important python advantage is chained comparison 
 We must wrap every comparison like described below. 

 ```ruby 
 puts "yes" if 1<2<3<4 

 class Fixnum 
   def <(a) 
     ((self<=>a)==-1)&&a 
   end 
 end 
 class FalseClass 
   def <(a) 
     false 
   end 
 end 
 ``` 

Back