A
aidy
Hi,
Can anyone tell me what the problem with this code is?
<snip>
class Test_log
def read_step_log (filepath)
@filepath = filepath
f = File.open(@filePath, "r")
while(f.gets)
if /START TESTCASE|FAILED/
print
end
end
f.close
end
end
foo = Test_log.new
foo.read_step_log('C:\Ruby_Files\StepLog.txt')
</snip>
I am getting a `initialize': can't convert nil into String (TypeError)
Thanks
Aidy
Can anyone tell me what the problem with this code is?
<snip>
class Test_log
def read_step_log (filepath)
@filepath = filepath
f = File.open(@filePath, "r")
while(f.gets)
if /START TESTCASE|FAILED/
end
end
f.close
end
end
foo = Test_log.new
foo.read_step_log('C:\Ruby_Files\StepLog.txt')
</snip>
I am getting a `initialize': can't convert nil into String (TypeError)
Thanks
Aidy