aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/string.c b/string.c
index 247ca5327a..7472357f37 100644
--- a/string.c
+++ b/string.c
@@ -2066,17 +2066,13 @@ rb_str_buf_cat2(VALUE str, const char *ptr)
VALUE
rb_str_cat(VALUE str, const char *ptr, long len)
{
- if (len < 0) {
- rb_raise(rb_eArgError, "negative string size (or size too big)");
- }
-
return rb_str_buf_cat(str, ptr, len);
}
VALUE
rb_str_cat2(VALUE str, const char *ptr)
{
- return rb_str_cat(str, ptr, strlen(ptr));
+ return rb_str_buf_cat2(str, ptr);
}
static VALUE