Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 619db81c64
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (19 sloc) 0.336 kb
def ensure_without_return
yield
ensure
puts 'ensure'
true
end
ensure_without_return { puts 'block'; false }
#
#block
#ensure
#=> false
#
ensure_without_return { raise 'exception raised'; puts 'block'; false }
#
#ensure
#RuntimeError: exception raised
# from (irb):21
# from (irb):16:in `ensure_without_return'
# from (irb):21
Jump to Line
Something went wrong with that request. Please try again.