# File test-unit-3.3.4/lib/test/unit/fault-location-detector.rb, line 16 def split_backtrace_entry(entry) match_data = /\A(.+):(\d+)(?::(.*))?\z/.match(entry) return nil if match_data.nil? file, line_number, context = match_data.to_a[1..-1] line_number = line_number.to_i if /\Ain `(.+?)'/ =~ context method_name = $1 if /\Ablock (?:\(.+?\) )?in / =~ method_name method_name = $POSTMATCH end else method_name = nil end [file, line_number, context, method_name] end
# File test-unit-3.3.4/lib/test/unit/fault-location-detector.rb, line 32 def target?(backtrace_entry) file, line_number, context, method_name = split_backtrace_entry(backtrace_entry) _ = context return false if file.nil? if @fault_source_location target_source_location?(file, line_number, method_name) elsif @fault_method_name target_method?(method_name) else true end end