aboutsummaryrefslogtreecommitdiffstats
path: root/ext/nkf/nkf.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/nkf/nkf.c')
-rw-r--r--ext/nkf/nkf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/nkf/nkf.c b/ext/nkf/nkf.c
index 3db6003bbf..f2647f3d9d 100644
--- a/ext/nkf/nkf.c
+++ b/ext/nkf/nkf.c
@@ -145,6 +145,7 @@ rb_nkf_convert(VALUE obj, VALUE opt, VALUE src)
reinit();
StringValue(opt);
nkf_split_options(RSTRING_PTR(opt));
+ if (!output_encoding) rb_raise(rb_eArgError, "no output encoding given");
incsize = INCSIZE;