From fcce99c52d786e336ab0a8f8205a04841fc743d0 Mon Sep 17 00:00:00 2001 From: matz Date: Sat, 18 Oct 2008 10:29:06 +0000 Subject: * re.c (rb_reg_initialize_m): specify ARG_ENCODING_NONE instead of ARG_ENCODING_FIXED for Regexp.new("", nil, "n"). [ruby-dev:36761] * test/ruby/test_regexp.rb (TestRegexp#test_initialize): test updated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- re.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 're.c') diff --git a/re.c b/re.c index 48a12ee3bc..bd598ddf66 100644 --- a/re.c +++ b/re.c @@ -2795,7 +2795,7 @@ rb_reg_initialize_m(int argc, VALUE *argv, VALUE self) char *kcode = StringValuePtr(argv[2]); if (kcode[0] == 'n' || kcode[1] == 'N') { enc = rb_ascii8bit_encoding(); - flags |= ARG_ENCODING_FIXED; + flags |= ARG_ENCODING_NONE; } else { rb_warn("encoding option is ignored - %s", kcode); -- cgit v1.2.3