Remove implicit conversion using to_str method; fix #3854

We have added internal convenience method `__to_str` which
does string type check.

The issue #3854 was fixed but fundamental flaw of lack of stack
depth check along with fibers still remains. Use `MRB_GC_FIXED_ARENA`
for workaround.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2018-09-19 21:51:53 +09:00
parent afca99a40b
commit ff08856fe3
13 changed files with 60 additions and 114 deletions
+1 -2
View File
@@ -311,8 +311,7 @@ MRB_API mrb_value mrb_str_substr(mrb_state *mrb, mrb_value str, mrb_int beg, mrb
* @param [mrb_value] str Ruby string.
* @return [mrb_value] A Ruby string.
*/
MRB_API mrb_value mrb_string_type(mrb_state *mrb, mrb_value str);
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);
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);