diff options
Diffstat (limited to 'encoding.c')
-rw-r--r-- | encoding.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/encoding.c b/encoding.c index 744be89223..18f54e684c 100644 --- a/encoding.c +++ b/encoding.c @@ -536,7 +536,8 @@ rb_enc_registered(const char *name) static VALUE require_enc(VALUE enclib) { - return rb_require_safe(enclib, rb_safe_level()); + int safe = rb_safe_level(); + return rb_require_safe(enclib, safe > 3 ? 3 : safe); } static int |