summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
Diffstat (limited to 're.c')
-rw-r--r--re.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/re.c b/re.c
index 46d0bbfcb7..562c151c7c 100644
--- a/re.c
+++ b/re.c
@@ -2008,7 +2008,7 @@ rb_reg_initialize(VALUE obj, const char *s, int len, rb_encoding *enc,
}
}
else if (!(options & ARG_ENCODING_FIXED)) {
- enc = a_enc;
+ enc = rb_usascii_encoding();
}
rb_enc_associate((VALUE)re, enc);