summaryrefslogtreecommitdiff
path: root/spec/ruby/language
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-05-03 12:28:29 +0200
committerBenoit Daloze <eregontp@gmail.com>2020-05-03 12:28:29 +0200
commit5aaa75e7c1f4b7912c10ffdcb1cac581e20eda39 (patch)
treee1694f5a4a5558884b1b8f3890b186793e5e982f /spec/ruby/language
parentf646d20aaeb8f02bcd3d0c5c3f5a372da654502a (diff)
Update to ruby/spec@032ee74
Diffstat (limited to 'spec/ruby/language')
-rw-r--r--spec/ruby/language/hash_spec.rb2
-rw-r--r--spec/ruby/language/predefined_spec.rb4
-rw-r--r--spec/ruby/language/regexp/encoding_spec.rb4
-rw-r--r--spec/ruby/language/regexp_spec.rb2
-rw-r--r--spec/ruby/language/variables_spec.rb2
5 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/language/hash_spec.rb b/spec/ruby/language/hash_spec.rb
index 6f2e8e5cf0..630c9d2364 100644
--- a/spec/ruby/language/hash_spec.rb
+++ b/spec/ruby/language/hash_spec.rb
@@ -38,7 +38,7 @@ describe "Hash literal" do
key.reverse!
h["foo"].should == "bar"
h.keys.first.should == "foo"
- h.keys.first.frozen?.should == true
+ h.keys.first.should.frozen?
key.should == "oof"
end
diff --git a/spec/ruby/language/predefined_spec.rb b/spec/ruby/language/predefined_spec.rb
index b0616da19b..5ce4e77906 100644
--- a/spec/ruby/language/predefined_spec.rb
+++ b/spec/ruby/language/predefined_spec.rb
@@ -53,10 +53,10 @@ describe "Predefined global $~" do
it "is set to nil if the last match was unsuccessful" do
/foo/ =~ 'foo'
- $~.nil?.should == false
+ $~.should_not.nil?
/foo/ =~ 'bar'
- $~.nil?.should == true
+ $~.should.nil?
end
it "is set at the method-scoped level rather than block-scoped" do
diff --git a/spec/ruby/language/regexp/encoding_spec.rb b/spec/ruby/language/regexp/encoding_spec.rb
index 2db09fdda8..8e2a294b95 100644
--- a/spec/ruby/language/regexp/encoding_spec.rb
+++ b/spec/ruby/language/regexp/encoding_spec.rb
@@ -121,11 +121,11 @@ describe "Regexps with encoding modifiers" do
make_regexp = -> str { /#{str}/ }
r = make_regexp.call("été".force_encoding(Encoding::UTF_8))
- r.fixed_encoding?.should == true
+ r.should.fixed_encoding?
r.encoding.should == Encoding::UTF_8
r = make_regexp.call("abc".force_encoding(Encoding::UTF_8))
- r.fixed_encoding?.should == false
+ r.should_not.fixed_encoding?
r.encoding.should == Encoding::US_ASCII
end
end
diff --git a/spec/ruby/language/regexp_spec.rb b/spec/ruby/language/regexp_spec.rb
index cd71d54338..ac3f773c49 100644
--- a/spec/ruby/language/regexp_spec.rb
+++ b/spec/ruby/language/regexp_spec.rb
@@ -20,7 +20,7 @@ describe "Literal Regexps" do
ruby_version_is "2.8" do
it "is frozen" do
- /Hello/.frozen?.should == true
+ /Hello/.should.frozen?
end
end
diff --git a/spec/ruby/language/variables_spec.rb b/spec/ruby/language/variables_spec.rb
index 7c2c7889f1..8b67289df4 100644
--- a/spec/ruby/language/variables_spec.rb
+++ b/spec/ruby/language/variables_spec.rb
@@ -361,7 +361,7 @@ describe "Multiple assignment" do
end
res = *obj
res.should == [1,2]
- res.frozen?.should == false
+ res.should_not.frozen?
end
it "consumes values for an anonymous splat" do