Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: a55ac46404
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 18 lines (8 sloc) 0.329 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<h1>Kernel#suppress</h1>


<p>Blocks and ignores any exception passed as argument if raised within the
block.</p>

<pre data-language="ruby">suppress(ZeroDivisionError) do
  1/0
  puts &quot;This code is NOT reached&quot;
end

puts &quot;This code gets executed and nothing related to ZeroDivisionError was seen&quot;</pre>





Something went wrong with that request. Please try again.