diff options
Diffstat (limited to 'spec/ruby/core/array/pack/empty_spec.rb')
-rw-r--r-- | spec/ruby/core/array/pack/empty_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/ruby/core/array/pack/empty_spec.rb b/spec/ruby/core/array/pack/empty_spec.rb new file mode 100644 index 0000000000..701e20b0af --- /dev/null +++ b/spec/ruby/core/array/pack/empty_spec.rb @@ -0,0 +1,11 @@ +require File.expand_path('../../../../spec_helper', __FILE__) + +describe "Array#pack with empty format" do + it "returns an empty String" do + [1, 2, 3].pack("").should == "" + end + + it "returns a String with US-ASCII encoding" do + [1, 2, 3].pack("").encoding.should == Encoding::US_ASCII + end +end |