summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-06-23 09:49:14 +0900
committerYukihiro Matsumoto <[email protected]>2012-06-23 09:49:14 +0900
commit2d781f5c1da6f627d9b4d3c2c7e9444108e09221 (patch)
tree57df9993b71c0dcb67c80ea9ecdbc82624796035 /src/string.c
parent771ab3bc4e8f9818f934b4203d6adf24ec1df501 (diff)
downloadmruby-2d781f5c1da6f627d9b4d3c2c7e9444108e09221.tar.gz
mruby-2d781f5c1da6f627d9b4d3c2c7e9444108e09221.zip
remove assertion for false assumption; mrb_str_new(0, len) where len > 0 can be used to allocate an unintialized string
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/string.c b/src/string.c
index 6b2df1590..a943512c7 100644
--- a/src/string.c
+++ b/src/string.c
@@ -21,7 +21,6 @@
#include "regex.h"
#include "st.h"
#endif //ENABLE_REGEXP
-#include <assert.h>
const char mrb_digitmap[] = "0123456789abcdefghijklmnopqrstuvwxyz";
@@ -222,7 +221,7 @@ mrb_value
mrb_str_new(mrb_state *mrb, const char *p, int len)
{
struct RString *s;
- assert(!(!p && len));
+
s = str_new(mrb, p, len);
return mrb_obj_value(s);
}