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 9592e91591..563acbf3af 100644
--- a/re.c
+++ b/re.c
@@ -259,7 +259,7 @@ rb_reg_expr_str(VALUE str, const char *s, long len)
else if (!rb_enc_isspace(c, enc)) {
char b[8];
- sprintf(b, "\\%03o", c);
+ sprintf(b, "\\x%02x", c);
rb_str_buf_cat(str, b, 4);
}
else {