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?
173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/ae/core_ext/helpers.rb', line 173 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 |