Skip to content

Instantly share code, notes, and snippets.

View tkadauke's full-sized avatar

Thomas Kadauke tkadauke

View GitHub Profile
class Array
def index_of(&block)
each_with_index do |item, index|
return index if yield(item)
end
end
end
def print_these_strings(&block)
block.inspect =~ /#<Proc:.*?@(.*?):(.*?)>/