diff options
Diffstat (limited to 'transcode.c')
-rw-r--r-- | transcode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/transcode.c b/transcode.c index 01acde79b5..cd3f56dc6b 100644 --- a/transcode.c +++ b/transcode.c @@ -370,7 +370,7 @@ rb_str_transcode_bang(int argc, VALUE *argv, VALUE str) VALUE newstr = str; int encidx = str_transcode(argc, argv, &newstr); - if (encidx < 0) return Qnil; + if (encidx < 0) return str; rb_str_shared_replace(str, newstr); rb_enc_associate_index(str, encidx); return str; |