Skip to content

Commit 47de8f5

Browse files
committed
[DOC] Doc for StringIO#size
1 parent c9bebec commit 47de8f5

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

doc/stringio/size.rdoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Returns the number of bytes in the string in +self+:
2+
3+
StringIO.new('hello').size # => 5 # Five 1-byte characters.
4+
StringIO.new('тест').size # => 8 # Four 2-byte characters.
5+
StringIO.new('こんにちは').size # => 15 # Five 3-byte characters.

ext/stringio/stringio.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,10 +1998,10 @@ strio_syswrite_nonblock(int argc, VALUE *argv, VALUE self)
19981998

19991999
/*
20002000
* call-seq:
2001-
* strio.length -> integer
2002-
* strio.size -> integer
2001+
* size -> integer
2002+
*
2003+
* :include: stringio/size.rdoc
20032004
*
2004-
* Returns the size of the buffer string.
20052005
*/
20062006
static VALUE
20072007
strio_size(VALUE self)

0 commit comments

Comments
 (0)