my_fileno: use rb_io_check_closed for Ruby <3.1
commit09a2f8678e7eddfc604ca7284fec81e278b774bc
authorEric Wong <bofh@yhbt.net>
Sun, 11 Jun 2023 21:33:26 +0000 (11 21:33 +0000)
committerEric Wong <bofh@yhbt.net>
Mon, 26 Jun 2023 09:16:38 +0000 (26 09:16 +0000)
treeade724584f5b36bde4c947969054770d19a252d9
parenta8dfec2568830241a27fce10014b6151a7a47813
my_fileno: use rb_io_check_closed for Ruby <3.1

This is less code and hopefully smaller binaries.
`rb_io_check_closed' has been in Ruby since the pre-CVS of
decades ago, and it doesn't matter if it's removed or not
in the future since Ruby 3.1+ doesn't see this code path
and calls `rb_io_descriptor' directly.
ext/raindrops/my_fileno.h