summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'error.c')
-rw-r--r--error.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/error.c b/error.c
index 479caff213..f05600f7fb 100644
--- a/error.c
+++ b/error.c
@@ -1057,6 +1057,7 @@ syserr_initialize(int argc, VALUE *argv, VALUE self)
else {
mesg = rb_str_new2(err);
}
+ rb_enc_associate(mesg, rb_locale_encoding());
rb_call_super(1, &mesg);
rb_iv_set(self, "errno", error);
return self;