diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-06-20 02:32:17 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-06-20 09:26:11 +0900 |
commit | cd3a5cd0e33f7b2495c5b3421e7f1d124de8c343 (patch) | |
tree | 95ab3b9e5765516f570bee52fef0c963f5491067 /re.c | |
parent | 6622a41891d4b566f1668db4be58dd19a3e24102 (diff) | |
download | ruby-cd3a5cd0e33f7b2495c5b3421e7f1d124de8c343.tar.gz |
[DOC] Fixed omissions in Regexp.new arguments
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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. |