Skip to content

Commit

Permalink
add failing spec for String.new with optional encoding argument
Browse files Browse the repository at this point in the history
  • Loading branch information
tak1n committed Jan 21, 2016
1 parent 9cf58de commit 57d8550
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/ruby/core/string/new_spec.rb
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions spec/tags/ruby/core/string/new_tags.txt
@@ -0,0 +1 @@
fails:String.new accepts an encoding argument

0 comments on commit 57d8550

Please sign in to comment.