summaryrefslogtreecommitdiffhomepage
path: root/src/ruby/nxt_ruby_stream_io.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2025-01-22ruby: Fix build failures with Ruby 3.4Andrew Clayton1-5/+23
Ruby 3.4 started to actually mark some deprecated functions as *deprecated* now resulting in compiler warnings (which due to -Werror we treat as errors and thus the build fails). The *new* functions were actually introduced back in Ruby 1.9.2, so have been around for quite some time. We claim support for Ruby 2.0 onwards so this is more than fine. The new API replaces the old 'mark' and 'free' parameters with a struct that allows for more fine tuning/configuration. We never made use of either of those parameters and so the only members of this struct we *need* to set is the structure wrapper name and the dsize function pointer which is passed a pointer to the underlying wrapped structure to calculate its memory usage. While this is *not* required the documentation *recommends* setting it (though it doesn't say how it's used). Ruby pytests still pass after this change... Closes: https://github.com/nginx/unit/issues/1525 Link: <https://bugs.ruby-lang.org/issues/19998> Link: <https://docs.ruby-lang.org/en/3.4/extension_rdoc.html#label-C+struct+to+Ruby+object> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2022-05-13Ruby: added stream IO "close" required by Rack specification.Zhidao HONG1-0/+10
This closes #654 issue on Github.
2021-05-18Ruby: changing deprecated rb_cData to rb_cObject.Oisin Canty1-2/+6
Ruby 3.0 deprecated rb_cData with the intention to remove it in release 3.1. This commit changes references of rb_cData to rb_cObject. This was done so we can support distributions that package Ruby 3.0, such as Fedora 34. We also need to call rb_undef_alloc_func because we're no longer deriving from rb_cData. This prevents unnecessary allocations. See: https://docs.ruby-lang.org/en/3.0.0/doc/extension_rdoc.html "It is recommended that klass derives from a special class called Data (rb_cData) but not from Object or other ordinal classes. If it doesn't, you have to call rb_undef_alloc_func(klass)."
2020-11-05Ruby: request processing in multiple threads.Max Romanov1-28/+23
This closes #482 issue on GitHub.
2020-03-12Introducing readline function in libunit.Max Romanov1-20/+8
Ruby and Java modules now use this function instead of own implementations.
2020-01-28Ruby: changing callback functions prototype for v2.7.Max Romanov1-9/+9
This closes #371 issue on GitHub.
2019-10-10Style fixes.Igor Sysoev1-2/+4
2018-08-06Unit application library.Max Romanov1-49/+29
Library now used in all language modules. Old 'nxt_app_*' code removed. See src/test/nxt_unit_app_test.c for usage sample.
2018-03-21Added Ruby support.Alexander Borisov1-0/+290