Google

def current_line @er_source.rewind line = 0 count = 0 @buffer.split("\n").each {|l| b = Regexp.escape( l ) @er_source.find {|l| l =~ /#{b}/u} line = @er_source.lineno - count count += 1 } line end