1
說我有這樣的代碼:
class A
def initialize
myMethod()
print "This should not be printed"
end
def myMethod
#here
end
end
obj = A.new
print "This should be printed"
是否有任何命令,我可以而不是「#here」,它會退出'obj'對象並繼續下一個語句? (打印「這應該是印刷」)
可能重複[如何突破外循環紅寶石?](http://stackoverflow.com/questions/ 1352120 /如何打破外部循環在紅寶石),http://stackoverflow.com/questions/4988045 – sawa