summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authorHerwin <[email protected]>2023-10-20 00:18:03 +0200
committer<[email protected]>2023-10-20 07:18:03 +0900
commit3467355450960050759618681ffd048614b24d93 ()
tree20ca6f99fd64e567a59e36d94ca6f5b99a1dbe6d /re.c
parent5bbb6fd6c3d26ffb7b1ffbe674c43cd07f3153ba (diff)
[DOC] Fix typo in docs of Regexp#deconstruct_keys
of => if
-rw-r--r--re.c2
1 files changed, 1 insertions, 1 deletions
@@ -2390,7 +2390,7 @@ match_named_captures(int argc, VALUE *argv, VALUE match)
* m.deconstruct_keys([:hours, :minutes]) # => {:hours => "18", :minutes => "37"}
* m.deconstruct_keys(nil) # => {:hours => "18", :minutes => "37", :seconds => "22"}
*
- * Returns an empty hash of no named captures were defined:
*
* m = /(\d{2}):(\d{2}):(\d{2})/.match("18:37:22")
* m.deconstruct_keys(nil) # => {}