diff options
author | OKURA Masafumi <masafumi.o1988@gmail.com> | 2023-01-30 12:07:18 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-02-21 19:31:35 +0900 |
commit | a44f5ab089ca208cdd96fc2c7597f1c17b27c235 (patch) | |
tree | 074a89afdadda92bc71558274a89af48dfcef910 /ext/strscan | |
parent | a350ef9f7a27b1338137f9753fe1517d9d0ea3b3 (diff) |
[ruby/strscan] Mention return value of `rest?` in the doc
(https://github.com/ruby/strscan/pull/49)
The doc of `rest?` was unclear about return value. This commit adds the
return value to the doc.
Diffstat (limited to 'ext/strscan')
-rw-r--r-- | ext/strscan/strscan.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c index 172ce1d6c5..b83cad1842 100644 --- a/ext/strscan/strscan.c +++ b/ext/strscan/strscan.c @@ -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) |