StringIO#readlines(nil)

e$B0J2<$N$h$&$Ke(B StringIO#readlines e$B$Ke(B nil e$B$rM?$($k$He(B
TypeError
e$B$K$J$j$^$9!#e(B

% ./ruby -rstringio -e ‘p StringIO.new(“a\nb\n”).readlines(nil)’
-e:1:in readlines': can't convert nil into String (TypeError) from -e:1:in

IO#readlines e$B$J$i!"0J2<$N$h$&$K%U%!%$%k$N;D$jA4It$,0l9T$H$7e(B
[email protected]$i$l$^$9!#e(B

% ruby -e ‘puts “a”, “b”’ | ./ruby -e ‘p STDIN.readlines(nil)’
[“a\nb\n”]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs