ruby-changes:26754
From: naruse <ko1@a...>
Date: Mon, 14 Jan 2013 07:06:31 +0900 (JST)
Subject: [ruby-changes:26754] naruse:r38806 (trunk): [rdoc] expalin kcode argument of Regexp.new
naruse 2013-01-14 07:02:31 +0900 (Mon, 14 Jan 2013) New Revision: 38806 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38806 Log: [rdoc] expalin kcode argument of Regexp.new Modified files: trunk/re.c Index: re.c =================================================================== --- re.c (revision 38805) +++ re.c (revision 38806) @@ -2889,9 +2889,9 @@ rb_reg_match_m(int argc, VALUE *argv, VA https://github.com/ruby/ruby/blob/trunk/re.c#L2889 /* * call-seq: - * Regexp.new(string, [options [, lang]]) -> regexp + * Regexp.new(string, [options [, kcode]]) -> regexp * Regexp.new(regexp) -> regexp - * Regexp.compile(string, [options [, lang]]) -> regexp + * Regexp.compile(string, [options [, kcode]]) -> regexp * Regexp.compile(regexp) -> regexp * * Constructs a new regular expression from +pattern+, which can be either a @@ -2903,7 +2903,8 @@ rb_reg_match_m(int argc, VALUE *argv, VA https://github.com/ruby/ruby/blob/trunk/re.c#L2903 * <em>or</em>-ed together. Otherwise, if +options+ is not * +nil+ or +false+, the regexp will be case insensitive. * - * When the +lang+ parameter is `n' or `N' sets the regexp no encoding. + * 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/