ライブラリの内部から素のRuntimeErrrescue
できます。
1 def RuntimeError(message) 2 ($!.is_a?(RuntimeErr or) and $!.message == message) ? RuntimeErr or : Class 3 end 4 5 begin 6 # do something 7 rescue RuntimeErr or('connection closed by server') => e 8 # ... 9 end
posted by
genki
on Tue 29 Jul 2014
at 11:01