Skip to content

Commit

Permalink
Mention return value of rest? in the doc (#49)
Browse files Browse the repository at this point in the history
The doc of `rest?` was unclear about return value. This commit adds the
return value to the doc.
  • Loading branch information
okuramasafumi authored Jan 30, 2023
1 parent 3ada126 commit 0856e23
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ext/strscan/strscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1038,8 +1038,9 @@ strscan_empty_p(VALUE self)
* This method is obsolete; use #eos? instead.
*
* s = StringScanner.new('test string')
* s.eos? # These two
* s.rest? # are opposites.
* # These two are opposites
* s.eos? # => false
* s.rest? # => true
*/
static VALUE
strscan_rest_p(VALUE self)
Expand Down

0 comments on commit 0856e23

Please sign in to comment.