summaryrefslogtreecommitdiffhomepage
path: root/src/ruby/nxt_ruby_stream_io.c
diff options
context:
space:
mode:
authorKonstantin Pavlov <thresh@nginx.com>2022-06-02 16:51:49 +0400
committerKonstantin Pavlov <thresh@nginx.com>2022-06-02 16:51:49 +0400
commitd9fddee1dbfc1f5d49c8f40386289d7188030952 (patch)
tree842a62b343ac33eba10e7a426a10b55bb1c46aed /src/ruby/nxt_ruby_stream_io.c
parent420395ee2e7cd464e157c49bea3d74f15bf25f30 (diff)
parent0d48fe73c4450901622373e35f6ff3a944ec13d6 (diff)
downloadunit-d9fddee1dbfc1f5d49c8f40386289d7188030952.tar.gz
unit-d9fddee1dbfc1f5d49c8f40386289d7188030952.tar.bz2
Merged with the default branch.1.27.0-1
Diffstat (limited to 'src/ruby/nxt_ruby_stream_io.c')
-rw-r--r--src/ruby/nxt_ruby_stream_io.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ruby/nxt_ruby_stream_io.c b/src/ruby/nxt_ruby_stream_io.c
index 82ad3908..4ef69cee 100644
--- a/src/ruby/nxt_ruby_stream_io.c
+++ b/src/ruby/nxt_ruby_stream_io.c
@@ -18,6 +18,7 @@ static VALUE nxt_ruby_stream_io_puts(VALUE obj, VALUE args);
static VALUE nxt_ruby_stream_io_write(VALUE obj, VALUE args);
nxt_inline long nxt_ruby_stream_io_s_write(nxt_ruby_ctx_t *rctx, VALUE val);
static VALUE nxt_ruby_stream_io_flush(VALUE obj);
+static VALUE nxt_ruby_stream_io_close(VALUE obj);
VALUE
@@ -38,6 +39,7 @@ nxt_ruby_stream_io_input_init(void)
rb_define_method(stream_io, "each", nxt_ruby_stream_io_each, 0);
rb_define_method(stream_io, "read", nxt_ruby_stream_io_read, -2);
rb_define_method(stream_io, "rewind", nxt_ruby_stream_io_rewind, 0);
+ rb_define_method(stream_io, "close", nxt_ruby_stream_io_close, 0);
return stream_io;
}
@@ -60,6 +62,7 @@ nxt_ruby_stream_io_error_init(void)
rb_define_method(stream_io, "puts", nxt_ruby_stream_io_puts, -2);
rb_define_method(stream_io, "write", nxt_ruby_stream_io_write, -2);
rb_define_method(stream_io, "flush", nxt_ruby_stream_io_flush, 0);
+ rb_define_method(stream_io, "close", nxt_ruby_stream_io_close, 0);
return stream_io;
}
@@ -257,3 +260,10 @@ nxt_ruby_stream_io_flush(VALUE obj)
{
return Qnil;
}
+
+
+static VALUE
+nxt_ruby_stream_io_close(VALUE obj)
+{
+ return Qnil;
+}