summaryrefslogtreecommitdiff
path: root/encoding.c
diff options
context:
space:
mode:
Diffstat (limited to 'encoding.c')
-rw-r--r--encoding.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/encoding.c b/encoding.c
index 19343ea7c99..6cf32a81dfc 100644
--- a/encoding.c
+++ b/encoding.c
@@ -902,7 +902,7 @@ enc_find(VALUE klass, VALUE enc)
{
int idx;
- if (SYMBOL_P(enc)) enc = rb_id2str(SYM2ID(enc));
+ StringValue(enc);
if (!rb_enc_asciicompat(rb_enc_get(enc))) {
rb_raise(rb_eArgError, "invalid name encoding (non ASCII)");
}