diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-27 20:21:25 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-27 20:21:25 +0000 |
commit | 37ef87c12b6c496001d0f199e46b4ecbfac5d394 (patch) | |
tree | 063c277e6343b299f6d47200e5b38f3af7975301 /spec/ruby/core/string | |
parent | ecf03376ec25fbd1ced6c0d1de110c6761e959fd (diff) |
Update to ruby/spec@cbe855c
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/core/string')
-rw-r--r-- | spec/ruby/core/string/chr_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/string/clear_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/string/freeze_spec.rb | 5 |
3 files changed, 4 insertions, 5 deletions
diff --git a/spec/ruby/core/string/chr_spec.rb b/spec/ruby/core/string/chr_spec.rb index c7834b78b7..a5e0cc4c88 100644 --- a/spec/ruby/core/string/chr_spec.rb +++ b/spec/ruby/core/string/chr_spec.rb @@ -4,7 +4,7 @@ with_feature :encoding do describe "String#chr" do it "returns a copy of self" do s = 'e' - s.object_id.should_not == s.chr.object_id + s.should_not equal s.chr end it "returns a String" do diff --git a/spec/ruby/core/string/clear_spec.rb b/spec/ruby/core/string/clear_spec.rb index c1bab8f39e..3db8b54cb0 100644 --- a/spec/ruby/core/string/clear_spec.rb +++ b/spec/ruby/core/string/clear_spec.rb @@ -14,7 +14,7 @@ with_feature :encoding do it "returns self after emptying it" do cleared = @s.clear cleared.should == "" - cleared.object_id.should == @s.object_id + cleared.should equal @s end it "preserves its encoding" do diff --git a/spec/ruby/core/string/freeze_spec.rb b/spec/ruby/core/string/freeze_spec.rb index bd7c2fbc73..476f50fbed 100644 --- a/spec/ruby/core/string/freeze_spec.rb +++ b/spec/ruby/core/string/freeze_spec.rb @@ -3,12 +3,11 @@ require File.expand_path('../../../spec_helper', __FILE__) describe "String#freeze" do it "produces the same object whenever called on an instance of a literal in the source" do - ids = Array.new(2) { "abc".freeze.object_id } - ids.first.should == ids.last + "abc".freeze.should equal "abc".freeze end it "doesn't produce the same object for different instances of literals in the source" do - "abc".object_id.should_not == "abc".object_id + "abc".should_not equal "abc" end it "being a special form doesn't change the value of defined?" do |