Class: Symbol
Instance Method Summary collapse
-
#thrown?(*args) ⇒ Boolean
Does the block throw this symbol?.
Instance Method Details
#thrown?(*args) ⇒ Boolean
Does the block throw this symbol?
184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/ae/core_ext.rb', line 184 def thrown?(*args) catch(self) do begin yield(*args) rescue ArgumentError # 1.9 exception rescue NameError # 1.8 exception end return false end return true end |