From: "Andrés Suárez" Date: 2008-07-17T04:53:45+09:00 Subject: Trying to find the number lines with a determinated word Hi, I'm trying to find the 'line' number where exists a predeterminated 'word': File.open(file) do |infile| lines = infile.readlines lines.each { |line| puts lines.index(line) if line.split.include? word } end When it finds the word, it puts 0? why? Thanks & regards, Andrés Suárez -- Posted via http://www.ruby-forum.com/.