Skip to content

Instantly share code, notes, and snippets.

@billdueber
Created May 19, 2015 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billdueber/6d501f730c79f6a74498 to your computer and use it in GitHub Desktop.
Save billdueber/6d501f730c79f6a74498 to your computer and use it in GitHub Desktop.
class A
include Enumerable
def each
(1..10).each do |i|
raise RuntimeError.new("SIX") if i == 6
yield i
end
end
end
a = A.new
a.each {|i| puts i} # how do I make this not bail out?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment