diff options
author | Marc-Andre Lafortune <github@marc-andre.ca> | 2020-09-14 15:15:28 -0400 |
---|---|---|
committer | Marc-André Lafortune <github@marc-andre.ca> | 2020-09-14 16:10:37 -0400 |
commit | 60f5d384820a4b07f739d32c2233b1dbc74a726a (patch) | |
tree | f2c03842f3ec17f0ec50c4904e5d55f958c0b1d6 /spec | |
parent | 125605abd949b23a8a95e1cc95f7d435efc17290 (diff) |
[ruby/ostruct] Fix dup/clone
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3541
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ruby/library/openstruct/frozen_spec.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/ruby/library/openstruct/frozen_spec.rb b/spec/ruby/library/openstruct/frozen_spec.rb index 63767bb54d..c14a4bac55 100644 --- a/spec/ruby/library/openstruct/frozen_spec.rb +++ b/spec/ruby/library/openstruct/frozen_spec.rb @@ -24,6 +24,7 @@ describe "OpenStruct.new when frozen" do it "creates a frozen clone" do f = @os.clone + f.frozen?.should == true f.age.should == 70 ->{ f.age = 0 }.should raise_error( RuntimeError ) ->{ f.state = :newer }.should raise_error( RuntimeError ) @@ -31,6 +32,7 @@ describe "OpenStruct.new when frozen" do it "creates an unfrozen dup" do d = @os.dup + d.frozen?.should == false d.age.should == 70 d.age = 42 d.age.should == 42 |