summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-math/src/math.c
diff options
context:
space:
mode:
authorHiroshi Mimaki <[email protected]>2019-10-18 14:46:03 +0900
committerHiroshi Mimaki <[email protected]>2019-10-18 14:46:03 +0900
commitb6546835457d1935a9c77965686b2a1256874d96 (patch)
tree724cfd71a7c956b0648e8c58f3717d797fff5f29 /mrbgems/mruby-math/src/math.c
parent8ee516436b8d174a50764939bee23a442aa00b3f (diff)
parent20d01f118ddb7e7f2f36926a7a3db35573611857 (diff)
downloadmruby-b6546835457d1935a9c77965686b2a1256874d96.tar.gz
mruby-b6546835457d1935a9c77965686b2a1256874d96.zip
Merge master.
Diffstat (limited to 'mrbgems/mruby-math/src/math.c')
-rw-r--r--mrbgems/mruby-math/src/math.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mrbgems/mruby-math/src/math.c b/mrbgems/mruby-math/src/math.c
index caa16b789..88b33771b 100644
--- a/mrbgems/mruby-math/src/math.c
+++ b/mrbgems/mruby-math/src/math.c
@@ -4,6 +4,10 @@
** See Copyright Notice in mruby.h
*/
+#ifdef MRB_WITHOUT_FLOAT
+# error Math conflicts 'MRB_WITHOUT_FLOAT' configuration in your 'build_config.rb'
+#endif
+
#include <mruby.h>
#include <mruby/array.h>
@@ -14,8 +18,7 @@ domain_error(mrb_state *mrb, const char *func)
{
struct RClass *math = mrb_module_get(mrb, "Math");
struct RClass *domainerror = mrb_class_get_under(mrb, math, "DomainError");
- mrb_value str = mrb_str_new_cstr(mrb, func);
- mrb_raisef(mrb, domainerror, "Numerical argument is out of domain - %S", str);
+ mrb_raisef(mrb, domainerror, "Numerical argument is out of domain - %s", func);
}
/* math functions not provided by Microsoft Visual C++ 2012 or older */