diff options
Diffstat (limited to 'spec/ruby/core/regexp/shared/quote.rb')
| -rw-r--r-- | spec/ruby/core/regexp/shared/quote.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/core/regexp/shared/quote.rb b/spec/ruby/core/regexp/shared/quote.rb index 48179444f0..083f12d78c 100644 --- a/spec/ruby/core/regexp/shared/quote.rb +++ b/spec/ruby/core/regexp/shared/quote.rb @@ -1,4 +1,4 @@ -# -*- encoding: binary -*- +# encoding: binary describe :regexp_quote, shared: true do it "escapes any characters with special meaning in a regular expression" do @@ -29,13 +29,13 @@ describe :regexp_quote, shared: true do it "sets the encoding of the result to the encoding of the String if any non-US-ASCII characters are present in an input String with valid encoding" do str = "ありがとう".dup.force_encoding("utf-8") - str.valid_encoding?.should be_true + str.valid_encoding?.should == true Regexp.send(@method, str).encoding.should == Encoding::UTF_8 end it "sets the encoding of the result to BINARY if any non-US-ASCII characters are present in an input String with invalid encoding" do str = "\xff".dup.force_encoding "us-ascii" - str.valid_encoding?.should be_false + str.valid_encoding?.should == false Regexp.send(@method, "\xff").encoding.should == Encoding::BINARY end end |
