summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
authorMasaki Muranaka <[email protected]>2012-05-29 16:15:43 +0900
committerMasaki Muranaka <[email protected]>2012-05-29 16:15:43 +0900
commit34dddc58e1cfc8091907406ce3df943cdf03bd4d (patch)
tree2947894dedacdc41b3a01bea6465300545c01c27 /src/string.c
parentc87ec7c33beb47c04bc00981fabfca371691ad97 (diff)
downloadmruby-34dddc58e1cfc8091907406ce3df943cdf03bd4d.tar.gz
mruby-34dddc58e1cfc8091907406ce3df943cdf03bd4d.zip
Use default case in switch statement.
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/string.c b/src/string.c
index 28513c15c..695b0d01c 100644
--- a/src/string.c
+++ b/src/string.c
@@ -4400,9 +4400,17 @@ mrb_str_conv_enc_opts(mrb_state *mrb, mrb_value str, mrb_encoding *from, mrb_enc
mrb_enc_associate(mrb, newstr, to);
return newstr;
- default:
+ case econv_invalid_byte_sequence:
+ case econv_undefined_conversion:
+ case econv_source_buffer_empty:
+ case econv_after_output:
+ case econv_incomplete_input:
/* some error, return original */
return str;
+
+ default:
+ mrb_bug("Internal Error: Invalid return value mrb_econv_convert.");
+ return str;
}
}