Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions doc/stringio/size.rdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Returns the number of bytes in the string in +self+:

StringIO.new('hello').size # => 5 # Five 1-byte characters.
StringIO.new('тест').size # => 8 # Four 2-byte characters.
StringIO.new('こんにちは').size # => 15 # Five 3-byte characters.
6 changes: 3 additions & 3 deletions ext/stringio/stringio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1998,10 +1998,10 @@ strio_syswrite_nonblock(int argc, VALUE *argv, VALUE self)

/*
* call-seq:
* strio.length -> integer
* strio.size -> integer
* size -> integer
*
* :include: stringio/size.rdoc
*
* Returns the size of the buffer string.
*/
static VALUE
strio_size(VALUE self)
Expand Down
Loading