On Sun, May 19, 2013 at 10:05 AM, Felipe Contreras <felipe.contreras@xxxxxxxxx> wrote: > On Sun, May 19, 2013 at 9:40 AM, Ramkumar Ramachandra > <artagnon@xxxxxxxxx> wrote: >>> + '-L', '%u,+%u' % [start, len], >>> + '--since', $since, from + '^', >>> + '--', source]) do |p| >>> + p.each do |line| >>> + if line =~ /^(\h{40})/ >>> + id = $1 >> >> Use $0 and remove the parens: you're matching the whole line. > > No, I'm not matching the whole line, but you are right; there's no > need for groups. Actually $&. -- Felipe Contreras -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html