Created
November 25, 2009 16:47
-
-
Save carlhuda/242865 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
catch(:EXISTS) do | |
@jobs.each_index do |i| | |
if @jobs[i] and (@jobs[i][0] == key || | |
@jobs[i][1] == key || | |
@jobs[i][1].context.main.equal?(key)) | |
@jobs[i] = nil | |
throw :EXISTS | |
end | |
end | |
IRB.fail NoSuchJob, key | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment