aboutsummaryrefslogtreecommitdiffstats
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'error.c')
-rw-r--r--error.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/error.c b/error.c
index 2fcacfaa5b..4758961e93 100644
--- a/error.c
+++ b/error.c
@@ -152,6 +152,8 @@ ruby_only_for_internal_use(const char *func)
static VALUE
rb_warning_s_warn(VALUE mod, VALUE str)
{
+ Check_Type(str, T_STRING);
+ rb_must_asciicompat(str);
rb_write_error_str(str);
return Qnil;
}