Z
Zhenning Guan
when I was running this code
------------
File.open("1c.txt") do |f|
while line= f.gets.chomp;
p line ;
end
end
-------------
why they warning with the message below?
=========
private method 'chomp' called for nil:NilClass <nomethoderror>
from ok.rb:2:in 'open'
from ok.rb:2
==========
------------
File.open("1c.txt") do |f|
while line= f.gets.chomp;
p line ;
end
end
-------------
why they warning with the message below?
=========
private method 'chomp' called for nil:NilClass <nomethoderror>
from ok.rb:2:in 'open'
from ok.rb:2
==========