diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2022-09-26 16:09:50 -0700 |
---|---|---|
committer | Aaron Patterson <tenderlove@ruby-lang.org> | 2022-09-26 16:10:11 -0700 |
commit | 06abfa5be60e589052eb3bdfdae6c132bea3d20b (patch) | |
tree | 32200df9a517d30a92dfe1003057e03cfba44701 /spec/ruby/optional | |
parent | b39690df3a90a838cdb2de71e70a20651ebafaf4 (diff) | |
download | ruby-06abfa5be60e589052eb3bdfdae6c132bea3d20b.tar.gz |
Revert this until we can figure out WB issues or remove shapes from GC
Revert "* expand tabs. [ci skip]"
This reverts commit 830b5b5c351c5c6efa5ad461ae4ec5085e5f0275.
Revert "This commit implements the Object Shapes technique in CRuby."
This reverts commit 9ddfd2ca004d1952be79cf1b84c52c79a55978f4.
Diffstat (limited to 'spec/ruby/optional')
-rw-r--r-- | spec/ruby/optional/capi/shared/rbasic.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/ruby/optional/capi/shared/rbasic.rb b/spec/ruby/optional/capi/shared/rbasic.rb index 105408ec3d..99c2044bd7 100644 --- a/spec/ruby/optional/capi/shared/rbasic.rb +++ b/spec/ruby/optional/capi/shared/rbasic.rb @@ -8,9 +8,16 @@ describe :rbasic, shared: true do it "reports the appropriate FREEZE flag for the object when reading" do obj, _ = @data.call - (@specs.get_flags(obj) & @freeze).should == 0 + initial = @specs.get_flags(obj) obj.freeze - (@specs.get_flags(obj) & @freeze).should == @freeze + @specs.get_flags(obj).should == @freeze | initial + end + + it "supports setting the FREEZE flag" do + obj, _ = @data.call + initial = @specs.get_flags(obj) + @specs.set_flags(obj, @freeze | initial).should == @freeze | initial + obj.should.frozen? end it "supports retrieving the (meta)class" do |