Skip to content

Commit 61ef92d

Browse files
authored
Merge pull request rurema#3230 from znz/c-classvar-toplevel-error
トップレベルからのクラス変数アクセスは RuntimeError になることを反映
2 parents 1bfce02 + 79474b5 commit 61ef92d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

manual/doc/spec/variables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ p Foo.a1 #=> :a
185185
def Foo.a2
186186
p @@a
187187
end
188-
Foo.a2 #=> NameError になります。
188+
Foo.a2 # ~> RuntimeError: class variable access from toplevel
189189

190190
class << Foo
191-
p @@a #=> NameError になります。
191+
p @@a # ~> RuntimeError: class variable access from toplevel
192192
end
193193
```
194194

0 commit comments

Comments
 (0)