summaryrefslogtreecommitdiff
path: root/ext/tcltklib
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tcltklib')
-rw-r--r--ext/tcltklib/tcltklib.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c
index adbe151f548..2792e53388b 100644
--- a/ext/tcltklib/tcltklib.c
+++ b/ext/tcltklib/tcltklib.c
@@ -3524,7 +3524,12 @@ lib_toUTF8_core(ip_obj, src, encodename)
StringValue(encodename);
encoding = Tcl_GetEncoding(interp, RSTRING(encodename)->ptr);
if (encoding == (Tcl_Encoding)NULL) {
- rb_warning("unknown encoding name '%s'", RSTRING(encodename)->ptr);
+ /*
+ rb_warning("unknown encoding name '%s'",
+ RSTRING(encodename)->ptr);
+ */
+ rb_raise(rb_eArgError, "unknown encoding name '%s'",
+ RSTRING(encodename)->ptr);
}
}
@@ -3667,8 +3672,13 @@ lib_fromUTF8_core(ip_obj, src, encodename)
encoding = Tcl_GetEncoding(interp, RSTRING(encodename)->ptr);
if (encoding == (Tcl_Encoding)NULL) {
- rb_warning("unknown encoding name '%s'", RSTRING(encodename)->ptr);
+ /*
+ rb_warning("unknown encoding name '%s'",
+ RSTRING(encodename)->ptr);
encodename = Qnil;
+ */
+ rb_raise(rb_eArgError, "unknown encoding name '%s'",
+ RSTRING(encodename)->ptr);
}
}