From d90105890028926f3dac77d233028417145fbee8 Mon Sep 17 00:00:00 2001 From: zzak Date: Tue, 9 Feb 2016 04:54:39 +0000 Subject: [PATCH] * re.c: Remove deprecated kcode argument from Regexp.new and compile patch provided by Dylan Pulliam [Bug #11495] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ re.c | 11 ++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 231d81cab0..1d78f5ef1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Feb 9 13:52:49 2016 Zachary Scott + + * re.c: Remove deprecated kcode argument from Regexp.new and compile + patch provided by Dylan Pulliam [Bug #11495] + Mon Feb 8 21:26:19 2016 Martin Duerst * enc/unicode/case-folding.rb, enc/unicode/casefold.h: Flags for diff --git a/re.c b/re.c index 32bb520c22..37798ea00f 100644 --- a/re.c +++ b/re.c @@ -3058,10 +3058,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), @@ -3072,9 +3072,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