From 5b809a28f825015661e7f51f0ecb5ecdfa7b77bd Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 22 Dec 2007 23:47:18 +0000 Subject: * include/ruby/encoding.h, encoding.c, re.c, io.c, parse.y, numeric.c, ruby.c, transcode.c: rename rb_ascii_encoding. to rb_ascii8bit_encoding. rb_ascii_encoding is ambiguous with ASCII-8BIT and US-ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- re.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 're.c') diff --git a/re.c b/re.c index f7d29d08f2..f6e4c76761 100644 --- a/re.c +++ b/re.c @@ -954,7 +954,7 @@ rb_reg_prepare_re(VALUE re, VALUE str) need_recompile = 1; } if ((RBASIC(re)->flags & REG_ENCODING_NONE) && - enc != rb_ascii_encoding() && + enc != rb_ascii8bit_encoding() && rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { rb_warn("regexp match /.../n against to %s string", rb_enc_name(enc)); @@ -1964,7 +1964,7 @@ rb_reg_initialize(VALUE obj, const char *s, int len, rb_encoding *enc, struct RRegexp *re = RREGEXP(obj); VALUE unescaped; rb_encoding *fixed_enc = 0; - rb_encoding *a_enc = rb_ascii_encoding(); + rb_encoding *a_enc = rb_ascii8bit_encoding(); if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4) rb_raise(rb_eSecurityError, "Insecure: can't modify regexp"); -- cgit v1.2.1