diff options
author | Benoit Daloze <eregontp@gmail.com> | 2019-04-28 23:20:11 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2019-04-28 23:20:11 +0200 |
commit | 79671ec57e59091260a0bc3d40a31d31d9c72a94 (patch) | |
tree | 2f59a8727b8f63f9e79d50352fa4f78a7cc00234 /spec/ruby/core/string/b_spec.rb | |
parent | 994833085ae06afbe94d30ab183d80e0234fbe14 (diff) | |
download | ruby-79671ec57e59091260a0bc3d40a31d31d9c72a94.tar.gz |
Update to ruby/spec@7de852d
Diffstat (limited to 'spec/ruby/core/string/b_spec.rb')
-rw-r--r-- | spec/ruby/core/string/b_spec.rb | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/spec/ruby/core/string/b_spec.rb b/spec/ruby/core/string/b_spec.rb index 6599c23d73..638971f9ce 100644 --- a/spec/ruby/core/string/b_spec.rb +++ b/spec/ruby/core/string/b_spec.rb @@ -2,23 +2,21 @@ require_relative '../../spec_helper' describe "String#b" do - with_feature :encoding do - it "returns an ASCII-8BIT encoded string" do - "Hello".b.should == "Hello".force_encoding(Encoding::ASCII_8BIT) - "こんちには".b.should == "こんちには".force_encoding(Encoding::ASCII_8BIT) - end + it "returns an ASCII-8BIT encoded string" do + "Hello".b.should == "Hello".force_encoding(Encoding::ASCII_8BIT) + "こんちには".b.should == "こんちには".force_encoding(Encoding::ASCII_8BIT) + end - it "returns new string without modifying self" do - str = "こんちには" - str.b.should_not equal(str) - str.should == "こんちには" - end + it "returns new string without modifying self" do + str = "こんちには" + str.b.should_not equal(str) + str.should == "こんちには" + end - it "copies own tainted/untrusted status to the returning value" do - utf_8 = "こんちには".taint.untrust - ret = utf_8.b - ret.tainted?.should be_true - ret.untrusted?.should be_true - end + it "copies own tainted/untrusted status to the returning value" do + utf_8 = "こんちには".taint.untrust + ret = utf_8.b + ret.tainted?.should be_true + ret.untrusted?.should be_true end end |