Closed kojix2 closed 5 years ago
@kojix2 , You were using Ruby < 2.5 ?
@Shekharrajak Ruby 2.6.1. This error does not always occur on any PC. I decided to close the issue because I thought it was not a problem with Ruby but an interference with the environment.
Yes! This problem will come when Ruby version > 2.4 .
Similar issue : https://github.com/SciRuby/daru/issues/503
Excuse me guys but I see three issues all linked to each other but I don't see the actual code patch. Am I blind?
I get this exact exception in my not related gem and google doesn't say much about it, only leads here. I get it when I call .pos
on stdout instance in some specific case within popen. I need it to count how much I've printed.
UPD:
$ ruby -e "p STDOUT.pos"
17800074
$ ruby -ropen3 -e "p Open3.capture2e 'ruby -e \"p STDOUT.pos\"'"
["-e:1:in `pos': Illegal seek @ rb_io_tell - <STDOUT> (Errno::ESPIPE)\n\tfrom -e:1:in `<main>'\n", #<Process::Status: pid 83602 exit 1>]
(the same on ruby 2.3.8 and 3.0.1)
code
d1.rb
terminal
error