summaryrefslogtreecommitdiffhomepage
path: root/src/error.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-08-31 10:47:13 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-09-01 07:00:55 +0900
commit2c41739b66e34ee20f614e4793dfb1dba4fd7274 (patch)
treeef779e10b1960fcfb7ea2b9f0d621b938a7cdd21 /src/error.c
parent082882da6977c29eaa614a96c376bd2225d55a04 (diff)
downloadmruby-2c41739b66e34ee20f614e4793dfb1dba4fd7274.tar.gz
mruby-2c41739b66e34ee20f614e4793dfb1dba4fd7274.zip
mruby.h: obsolete `mrb_to_str()`.
Replace them by `mrb_ensure_string_type()`.
Diffstat (limited to 'src/error.c')
-rw-r--r--src/error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/error.c b/src/error.c
index 0ef7bc9c1..206d1a0e8 100644
--- a/src/error.c
+++ b/src/error.c
@@ -27,7 +27,7 @@ mrb_exc_new(mrb_state *mrb, struct RClass *c, const char *ptr, size_t len)
MRB_API mrb_value
mrb_exc_new_str(mrb_state *mrb, struct RClass* c, mrb_value str)
{
- mrb_to_str(mrb, str);
+ mrb_ensure_string_type(mrb, str);
return mrb_obj_new(mrb, c, 1, &str);
}