在Ruby中根据运算对象的值的不同进行不同的操作。除法运算符"/"的两边同为Interger对象时运算符进行整除运算,其中任意一方为Float对象时进行实数的除法运算。
7 / 2 #=> 3 整除
7.0 / 2 #=> 3.5 除法计算