Open deepj opened 5 years ago
I'm just working on updating our documentation on standard libraries.
The following standard libraries are unsupported.
continuation
dbm
gdbm
sdbm
io/console
(partially implemented, could be implemented in the future)io/nonblock
(could be implemented in the future)io/wait
(partially implemented, could be implemented in the future)pty
(could be implemented in the future)ripper
(could be implemented in the future)win32
win32ole
fiddle
is not yet implemented - the module and some methods are there
but not enough to run anything serious.
We provide our own included implementation of the interface of the ffi
gem,
like JRuby and Rubinius, but the implemention of this is limited at the
moment.
EDIT: See https://github.com/oracle/truffleruby/blob/master/doc/user/compatibility.md#standard-libraries for up-to-date info.
pty
is used by the tests of the debug
gem:
https://github.com/ruby/debug/blob/d0a3372a864d3906ac2a81907b9222dba15883be/test/support/utils.rb#L3
It would be worth trying if importing the pty
sources from CRuby works.
@bjfish Could you try that?
also causes an issue with the appsignal apm
wicked_pdf gem also use pty
I have a PR partially done to add pty - will take a look at it again. It's also needed to run the debug gem tests.
JRuby recently used libfixposix to get pty
working in https://github.com/jruby/jruby/issues/6552, possibly relevant for us, as from reading that issue posix_spawn doesn't have that ability. But we could probably also do it in https://github.com/oracle/truffleruby/blob/master/src/main/c/spawn-helper/spawn-helper.c and that would be simpler/more direct.
As a note, using the pty
extension won't work because that relies on fork()
See https://ruby-doc.org/stdlib-2.0.0/libdoc/pty/rdoc/PTY.html
To reproduce:
Error:
This gem is used in querly tests