File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -370,23 +370,20 @@ strio_finalize(VALUE self)
370370
371371/*
372372 * call-seq:
373- * StringIO.open(string = '', mode = 'r+') {|strio| ... }
373+ * StringIO.open(string = '', mode = 'r+') -> new_stringio
374+ * StringIO.open(string = '', mode = 'r+') {|strio| ... } -> object
374375 *
375- * Note that +mode+ defaults to <tt>'r'</tt> if +string+ is frozen.
376- *
377- * Creates a new \StringIO instance formed from +string+ and +mode+;
378- * see {Access Modes}[rdoc-ref:File@Access+Modes].
376+ * Creates new \StringIO instance by calling <tt>StringIO.new(string, mode)</tt>.
379377 *
380- * With no block, returns the new instance:
378+ * With no block given , returns the new instance:
381379 *
382380 * strio = StringIO.open # => #<StringIO>
383381 *
384- * With a block, calls the block with the new instance
382+ * With a block given , calls the block with the new instance
385383 * and returns the block's value;
386- * closes the instance on block exit.
384+ * closes the instance on block exit:
387385 *
388- * StringIO.open {|strio| p strio }
389- * # => #<StringIO>
386+ * StringIO.open('foo') {|strio| strio.string.upcase } # => "FOO"
390387 *
391388 * Related: StringIO.new.
392389 */
You can’t perform that action at this time.
0 commit comments