diff options
Diffstat (limited to 'spec/ruby/core/string/unpack/p_spec.rb')
| -rw-r--r-- | spec/ruby/core/string/unpack/p_spec.rb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/spec/ruby/core/string/unpack/p_spec.rb b/spec/ruby/core/string/unpack/p_spec.rb index 136e32adfd..4103730269 100644 --- a/spec/ruby/core/string/unpack/p_spec.rb +++ b/spec/ruby/core/string/unpack/p_spec.rb @@ -15,11 +15,7 @@ describe "String#unpack with format 'P'" do packed = ["hello"].pack("P") packed.unpack("P5").should == ["hello"] packed.dup.unpack("P5").should == ["hello"] - lambda { packed.to_sym.to_s.unpack("P5") }.should raise_error(ArgumentError, /no associated pointer/) - end - - it "taints the unpacked string" do - ["hello"].pack("P").unpack("P5").first.tainted?.should be_true + -> { packed.to_sym.to_s.unpack("P5") }.should.raise(ArgumentError, /no associated pointer/) end it "reads as many characters as specified" do @@ -43,10 +39,6 @@ describe "String#unpack with format 'p'" do packed = ["hello"].pack("p") packed.unpack("p").should == ["hello"] packed.dup.unpack("p").should == ["hello"] - lambda { packed.to_sym.to_s.unpack("p") }.should raise_error(ArgumentError, /no associated pointer/) - end - - it "taints the unpacked string" do - ["hello"].pack("p").unpack("p").first.tainted?.should be_true + -> { packed.to_sym.to_s.unpack("p") }.should.raise(ArgumentError, /no associated pointer/) end end |
