如何在Ruby中拯救多重任务?
我该怎么通过呢?我想你不是指后面两行中的如何在Ruby中拯救多重任务?,ruby,exception-handling,Ruby,Exception Handling,我该怎么通过呢?我想你不是指后面两行中的a和b。。。 foo, bar = 1, 0/0 rescue 0, 0 # this won't work foo.should eql 0 bar.should eql 0 foo, bar = ([1, 0/0] rescue [0, 0])
a
和b
。。。
foo, bar = 1, 0/0 rescue 0, 0 # this won't work
foo.should eql 0
bar.should eql 0
foo, bar = ([1, 0/0] rescue [0, 0])