summaryrefslogtreecommitdiff
path: root/doc/strscan/methods/skip_until.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/strscan/methods/skip_until.md')
-rw-r--r--doc/strscan/methods/skip_until.md9
1 files changed, 4 insertions, 5 deletions
diff --git a/doc/strscan/methods/skip_until.md b/doc/strscan/methods/skip_until.md
index b7dacf6da1..a0ffab0b84 100644
--- a/doc/strscan/methods/skip_until.md
+++ b/doc/strscan/methods/skip_until.md
@@ -1,13 +1,11 @@
-call-seq:
- skip_until(pattern) -> matched_substring_size or nil
-
Attempts to [match][17] the given `pattern`
-anywhere (at any [position][2]) in the [target substring][3];
-does not modify the positions.
+anywhere (at any [position][2]) in the [target substring][3].
If the match attempt succeeds:
- Sets [match values][9].
+- Sets the [byte position][2] to the end of the matched substring;
+ may adjust the [character position][7].
- Returns the size of the matched substring.
```rb
@@ -42,6 +40,7 @@ If the match attempt fails:
- Clears match values.
- Returns `nil`.
+- Does not update positions.
```rb
scanner.skip_until(/nope/) # => nil