SHARE
TWEET

Untitled

a guest Jul 3rd, 2012 115 Never
  1. def a(&block)
  2.   ('a'..'z').each do |n|
  3.     begin
  4.       block.binding.eval("#{n} = '#{n.upcase}!'")
  5.     rescue Exception
  6.     end
  7.   end
  8. end
  9.  
  10.  
  11. def z
  12.   b = 1
  13.   a{nil}
  14.   b
  15. end
  16.  
  17. puts z
  18. # => B!
RAW Paste Data
Top