Skip to content

Commit 82b630c

Browse files
committed
[DOC] Improved about intr:
1 parent 5facbfc commit 82b630c

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

ext/io/console/console.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,9 @@ ttymode_with_io(VALUE io, VALUE (*func)(VALUE, VALUE), VALUE farg, void (*setter
360360

361361
/*
362362
* call-seq:
363-
* io.raw(min: nil, time: nil) {|io| }
363+
* io.raw(min: nil, time: nil, intr: nil) {|io| }
364364
*
365-
* Yields +self+ within raw mode.
365+
* Yields +self+ within raw mode, and returns the result of the block.
366366
*
367367
* STDIN.raw(&:gets)
368368
*
@@ -374,6 +374,9 @@ ttymode_with_io(VALUE io, VALUE (*func)(VALUE, VALUE), VALUE farg, void (*setter
374374
* The parameter +time+ specifies the timeout in _seconds_ with a
375375
* precision of 1/10 of a second. (default: 0)
376376
*
377+
* If the parameter +intr+ is +true+, enables break, interrupt, quit,
378+
* and suspend special characters.
379+
*
377380
* Refer to the manual page of termios for further details.
378381
*
379382
* You must require 'io/console' to use this method.
@@ -387,11 +390,11 @@ console_raw(int argc, VALUE *argv, VALUE io)
387390

388391
/*
389392
* call-seq:
390-
* io.raw!(min: nil, time: nil)
393+
* io.raw!(min: nil, time: nil, intr: nil) -> io
391394
*
392-
* Enables raw mode.
395+
* Enables raw mode, and returns +io+.
393396
*
394-
* If the terminal mode needs to be back, use io.raw { ... }.
397+
* If the terminal mode needs to be back, use <code>io.raw { ... }</code>.
395398
*
396399
* See IO#raw for details on the parameters.
397400
*
@@ -487,7 +490,7 @@ nogvl_getch(void *p)
487490

488491
/*
489492
* call-seq:
490-
* io.getch(min: nil, time: nil) -> char
493+
* io.getch(min: nil, time: nil, intr: nil) -> char
491494
*
492495
* Reads and returns a character in raw mode.
493496
*
@@ -1494,7 +1497,7 @@ console_dev(int argc, VALUE *argv, VALUE klass)
14941497

14951498
/*
14961499
* call-seq:
1497-
* io.getch(min: nil, time: nil) -> char
1500+
* io.getch(min: nil, time: nil, intr: nil) -> char
14981501
*
14991502
* See IO#getch.
15001503
*/

0 commit comments

Comments
 (0)