[DOC] Fix typo in docs of Regexp#deconstruct_keys

of => if
This commit is contained in:
Herwin 2023-10-20 00:18:03 +02:00 committed by GitHub
parent 5bbb6fd6c3
commit 3467355450
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

2
re.c
View file

@ -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:
* Returns an empty hash if no named captures were defined:
*
* m = /(\d{2}):(\d{2}):(\d{2})/.match("18:37:22")
* m.deconstruct_keys(nil) # => {}