Project

General

Profile

Bug #11495 ยป 0001-Improve-documentation-for-Regexp.new.patch

This contains the change for removing [, kcode] - dpulliam (Dylan Pulliam), 10/12/2015 12:05 AM

View differences:

re.c
3001 3001

  
3002 3002
/*
3003 3003
 *  call-seq:
3004
 *     Regexp.new(string, [options [, kcode]])       -> regexp
3005
 *     Regexp.new(regexp)                            -> regexp
3006
 *     Regexp.compile(string, [options [, kcode]])   -> regexp
3007
 *     Regexp.compile(regexp)                        -> regexp
3004
 *     Regexp.new(string, [options])       -> regexp
3005
 *     Regexp.new(regexp)                  -> regexp
3006
 *     Regexp.compile(string, [options)    -> regexp
3007
 *     Regexp.compile(regexp)              -> regexp
3008 3008
 *
3009 3009
 *  Constructs a new regular expression from +pattern+, which can be either a
3010 3010
 *  String or a Regexp (in which case that regexp's options are propagated),
......
3015 3015
 *  <em>or</em>-ed together.  Otherwise, if +options+ is not
3016 3016
 *  +nil+ or +false+, the regexp will be case insensitive.
3017 3017
 *
3018
 *  When the +kcode+ parameter is `n' or `N' sets the regexp no encoding.
3019
 *  It means that the regexp is for binary strings.
3020
 *
3021 3018
 *    r1 = Regexp.new('^a-z+:\\s+\w+') #=> /^a-z+:\s+\w+/
3022 3019
 *    r2 = Regexp.new('cat', true)     #=> /cat/i
3023 3020
 *    r3 = Regexp.new(r2)              #=> /cat/i
3024
-