ruby def find_matching_frame(regex) caller do |frame| return frame if frame.file =~ regex end end