Skip to content

Commit f2a5499

Browse files
committed
[DOC] Tweaks for StringIO.open
1 parent 2d47d21 commit f2a5499

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

ext/stringio/stringio.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -370,19 +370,18 @@ strio_finalize(VALUE self)
370370

371371
/*
372372
* call-seq:
373-
* self.open(string = '', mode = 'r+') -> new_stringio
374-
* self.open(string = '', mode = 'r+') {|strio| ... } -> object
373+
* StringIO.open(string = '', mode = 'r+') -> new_stringio
374+
* StringIO.open(string = '', mode = 'r+') {|strio| ... } -> object
375375
*
376-
* Creates new \StringIO instance by calling <tt>StringIO.new(string, mode)</tt>;
377-
* see StringIO.new.
376+
* Creates new \StringIO instance by calling <tt>StringIO.new(string, mode)</tt>.
378377
*
379378
* With no block given, returns the new instance:
380379
*
381380
* strio = StringIO.open # => #<StringIO>
382381
*
383-
* With a block given, calls the block with the new instance,
384-
* closes the instance on block exit,
385-
* and returns the block's value:
382+
* With a block given, calls the block with the new instance
383+
* and returns the block's value;
384+
* closes the instance on block exit:
386385
*
387386
* StringIO.open('foo') {|strio| strio.string.upcase } # => "FOO"
388387
*

0 commit comments

Comments
 (0)