From a74991b149ec9689d86a4a9460a52e007a044dc7 Mon Sep 17 00:00:00 2001 From: Dylan Pulliam Date: Sun, 11 Oct 2015 19:49:44 -0400 Subject: [PATCH] Improve documentation for Regexp.new() --- re.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/re.c b/re.c index eb87d0e..3761047 100644 --- a/re.c +++ b/re.c @@ -3001,10 +3001,10 @@ rb_reg_match_m(int argc, VALUE *argv, VALUE re) /* * call-seq: - * Regexp.new(string, [options [, kcode]]) -> regexp - * Regexp.new(regexp) -> regexp - * Regexp.compile(string, [options [, kcode]]) -> regexp - * Regexp.compile(regexp) -> regexp + * Regexp.new(string, [options]) -> regexp + * Regexp.new(regexp) -> regexp + * Regexp.compile(string, [options) -> regexp + * Regexp.compile(regexp) -> regexp * * Constructs a new regular expression from +pattern+, which can be either a * String or a Regexp (in which case that regexp's options are propagated), @@ -3015,9 +3015,6 @@ rb_reg_match_m(int argc, VALUE *argv, VALUE re) * or-ed together. Otherwise, if +options+ is not * +nil+ or +false+, the regexp will be case insensitive. * - * When the +kcode+ parameter is `n' or `N' sets the regexp no encoding. - * It means that the regexp is for binary strings. - * * r1 = Regexp.new('^a-z+:\\s+\w+') #=> /^a-z+:\s+\w+/ * r2 = Regexp.new('cat', true) #=> /cat/i * r3 = Regexp.new(r2) #=> /cat/i -- 2.3.4