Restore `mrb_string_type` function for compatibility.
MODIFY
include/mruby/string.h
include/mruby/string.h
@@ -313,6 +313,10 @@ MRB_API mrb_value mrb_str_substr(mrb_state *mrb, mrb_value str, mrb_int beg, mrb
*/
MRB_API mrb_value mrb_ensure_string_type(mrb_state *mrb, mrb_value str);
MRB_API mrb_value mrb_check_string_type(mrb_state *mrb, mrb_value str);
+/* obsolete: use mrb_ensure_string_type() instead */
+MRB_API mrb_value mrb_string_type(mrb_state *mrb, mrb_value str);
+
+
MRB_API mrb_value mrb_str_new_capa(mrb_state *mrb, size_t capa);
MRB_API mrb_value mrb_str_buf_new(mrb_state *mrb, size_t capa);

MODIFY
src/object.c
src/object.c
@@ -589,6 +589,13 @@ mrb_to_str(mrb_state *mrb, mrb_value val)
return val;
}
+/* obsolete: use mrb_ensure_string_type() instead */
+MRB_API mrb_value
+mrb_string_type(mrb_state *mrb, mrb_value str)
+{
+ return mrb_ensure_string_type(mrb, str);
+}
+
MRB_API mrb_value
mrb_ensure_string_type(mrb_state *mrb, mrb_value str)
{

Restore `mrb_string_type` function for compatibility.