mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[DOC] Fixed omissions in Regexp.new arguments
This commit is contained in:
parent
6622a41891
commit
cd3a5cd0e3
1 changed files with 6 additions and 2 deletions
8
re.c
8
re.c
|
@ -3633,8 +3633,8 @@ rb_reg_match_p(VALUE re, VALUE str, long pos)
|
|||
|
||||
/*
|
||||
* call-seq:
|
||||
* Regexp.new(string, options = 0, timeout: nil) -> regexp
|
||||
* Regexp.new(regexp) -> regexp
|
||||
* Regexp.new(string, options = 0, encoding = nil, timeout: nil) -> regexp
|
||||
* Regexp.new(regexp, timeout: nil) -> regexp
|
||||
*
|
||||
* With argument +string+ given, returns a new regexp with the given string
|
||||
* and options:
|
||||
|
@ -3656,6 +3656,10 @@ rb_reg_match_p(VALUE re, VALUE str, long pos)
|
|||
*
|
||||
* - +nil+ or +false+, which is ignored.
|
||||
*
|
||||
* If optional argument +encoding+ is a string starts with
|
||||
* <code>'n'</code>, the encoding of +string+ is ignored and the new
|
||||
* regexp encoding is fixed to +ASCII_8BIT+.
|
||||
*
|
||||
* If optional keyword argument +timeout+ is given,
|
||||
* its integer value overrides the timeout interval for the class,
|
||||
* Regexp.timeout.
|
||||
|
|
Loading…
Add table
Reference in a new issue