diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7b326e2..5e499c6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: name: build (${{ matrix.ruby }} / ${{ matrix.os }}) strategy: matrix: - ruby: [ '3.1', '3.0', '2.7', '2.6', head ] + ruby: [ '3.1', '3.0', '2.7', '2.6', head, truffleruby, truffleruby-head ] os: [ ubuntu-latest, macos-latest ] runs-on: ${{ matrix.os }} steps: diff --git a/ext/etc/etc.c b/ext/etc/etc.c index 6e2374e..0b3e5ff 100644 --- a/ext/etc/etc.c +++ b/ext/etc/etc.c @@ -68,11 +68,12 @@ void rb_deprecate_constant(VALUE mod, const char *name); #ifndef HAVE_RB_IO_DESCRIPTOR static int -rb_io_descriptor(VALUE io) { +io_descriptor_fallback(VALUE io) { rb_io_t *fptr; GetOpenFile(io, fptr); return fptr->fd; } +#define rb_io_descriptor io_descriptor_fallback #endif #ifdef HAVE_RUBY_ATOMIC_H