[8] pry(#<Plan>)> self[:total_outstanding]||0 / self.dd_amount
=> 10100.0
[9] pry(#<Plan>)> self[:total_outstanding]||0
=> 10100.0
[10] pry(#<Plan>)> self.dd_amount
=> 900.0
[11] pry(#<Plan>)> self[:total_outstanding].to_i||0/self.dd_amount.to_i
=> 10100
self[:total_outstanding].to_i||0/self.dd_amount.to_i 应该返回 11 而不是第一个属性的值 10100
我正在尝试在 pry session 中调试它
当代码运行时,它确实认为该值为 10100,这是错误的..