ruby-1.9.2-return-else.rb

Todd Huss, 03/06/2011 04:40 PM

Download (167 Bytes)

 
1
#!/usr/bin/env ruby
2

    
3
def test_return_in_method
4
  begin
5
    return
6
  rescue
7
    puts 'rescue executed'
8
  else
9
    puts 'else executed'
10
  end
11
end 
12
test_return_in_method