mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@7f22a0b
This commit is contained in:
parent
e6d93a27af
commit
67a1e22589
62 changed files with 656 additions and 59 deletions
|
@ -94,6 +94,12 @@ ruby_version_is "3.0" do
|
|||
}.should raise_error(RuntimeError, 'class variable access from toplevel')
|
||||
end
|
||||
|
||||
it "does not raise an error when checking if defined from the toplevel scope" do
|
||||
-> {
|
||||
eval "defined?(@@cvar_toplevel1)"
|
||||
}.should_not raise_error
|
||||
end
|
||||
|
||||
it "raises a RuntimeError when a class variable is overtaken in an ancestor class" do
|
||||
parent = Class.new()
|
||||
subclass = Class.new(parent)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue