There isn't a method accessible to ruby code to create a String with a specific capacity, but from a C extension [rb_str_buf_new(long capa)](https://github.com/ruby/ruby/blob/v2_1_1/string.c#L891) could be used.  That is what Array#join uses internally.