【发布时间】:2010-11-08 20:18:17
【问题描述】:
foo, bar = 1, 0/0 rescue 0, 0 # this won't work
foo.should eql 0
bar.should eql 0
我该如何做这个通行证?
【问题讨论】:
-
我不认为你的意思是后两行中的
a和b...
foo, bar = 1, 0/0 rescue 0, 0 # this won't work
foo.should eql 0
bar.should eql 0
我该如何做这个通行证?
【问题讨论】:
a 和b...
foo, bar = ([1, 0/0] rescue [0, 0])
【讨论】: