aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 105fe6a15d..9e36435c1f 100644
--- a/string.c
+++ b/string.c
@@ -5023,7 +5023,7 @@ rb_str_justify(int argc, VALUE *argv, VALUE str, char jflag)
width = NUM2LONG(w);
if (argc == 2) {
StringValue(pad);
- rb_enc_check(str, pad);
+ enc = rb_enc_check(str, pad);
f = RSTRING_PTR(pad);
flen = RSTRING_LEN(pad);
fclen = str_strlen(pad, enc);