diff --git a/core/string/new_spec.rb b/core/string/new_spec.rb index 0a246f6f53..b429ac48d2 100644 --- a/core/string/new_spec.rb +++ b/core/string/new_spec.rb @@ -15,6 +15,13 @@ end end + ruby_version_is "2.4" do + it "accepts a capacity argument" do + String.new("", capacity: 100_000).should == "" + String.new("abc", capacity: 100_000).should == "abc" + end + end + it "returns a fully-formed String" do str = String.new str.size.should == 0