Skip to content

Commit

Permalink
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/ruby/core/string/new_spec.rb
Original file line number Diff line number Diff line change
@@ -7,6 +7,12 @@
str.should be_an_instance_of(String)
end

it "accepts an encoding argument" do
str = String.new("\xA4\xA2", encoding: 'euc-jp')

str.encoding.should == Encoding::EUC_JP
end

it "returns a fully-formed String" do
str = String.new
str.size.should == 0
1 change: 1 addition & 0 deletions spec/tags/ruby/core/string/new_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:String.new accepts an encoding argument

0 comments on commit 2337179

Please sign in to comment.