diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-03-14 01:01:27 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2024-03-14 04:30:28 +0000 |
commit | c913f3347c9669f2efc854cad7e0e444fac0ae6a (patch) | |
tree | 364f995329e6b6447e817a41b204191de605d2fc /ext/stringio | |
parent | 35706c608c236b5d02a2975567bd1cdfda9cf4d6 (diff) | |
download | ruby-c913f3347c9669f2efc854cad7e0e444fac0ae6a.tar.gz |
[ruby/stringio] [DOC] Add missing documents
https://github.com/ruby/stringio/commit/9cc1dfa19c
Diffstat (limited to 'ext/stringio')
-rw-r--r-- | ext/stringio/stringio.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index 8cb792d27b..f581cd56bb 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -1698,8 +1698,14 @@ strio_read_nonblock(int argc, VALUE *argv, VALUE self) return val; } +/* + * See IO#write + */ #define strio_syswrite rb_io_write +/* + * See IO#write_nonblock + */ static VALUE strio_syswrite_nonblock(int argc, VALUE *argv, VALUE self) { @@ -1825,6 +1831,15 @@ strio_set_encoding(int argc, VALUE *argv, VALUE self) return self; } +/* + * call-seq: + * strio.set_encoding_by_bom => strio or nil + * + * Sets the encoding according to the BOM (Byte Order Mark) in the + * string. + * + * Returns +self+ if the BOM is found, otherwise +nil. + */ static VALUE strio_set_encoding_by_bom(VALUE self) { @@ -1857,6 +1872,7 @@ Init_stringio(void) VALUE StringIO = rb_define_class("StringIO", rb_cObject); + /* The version string */ rb_define_const(StringIO, "VERSION", rb_str_new_cstr(STRINGIO_VERSION)); rb_include_module(StringIO, rb_mEnumerable); |