mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@9277d27
This commit is contained in:
parent
ce986b41ca
commit
201d501640
17 changed files with 209 additions and 6 deletions
|
@ -80,4 +80,12 @@ describe "Kernel#freeze" do
|
|||
o.freeze
|
||||
-> {o.instance_variable_set(:@foo, 1)}.should raise_error(RuntimeError)
|
||||
end
|
||||
|
||||
it "freezes an object's singleton class" do
|
||||
o = Object.new
|
||||
c = o.singleton_class
|
||||
c.frozen?.should == false
|
||||
o.freeze
|
||||
c.frozen?.should == true
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue