module And
Public Instance Methods
search()
click to toggle source
# File lib/and.rb, line 12 def search one = ARGV[1] File.open(one) do |f| while (str2 = f.gets) str = str2.chomp! twice = ARGV[2] three_act2 = /^(?=.*#{twice})/o begin if str =~ three_act2 printf('%2d : %s', f.lineno, str) puts '' end rescue Timeout::Error exit! end end if f.eof? puts '' elsif !f.eof begin raise And rescue StandardError => ee puts ee.backtrace puts ee.backtrace_locations exit! end end end end