Q: What does the last expression evaluates to?
Answered
quiz
37/37
class A @a = 1 @@a = 2 end class B < A def self.show_vars [@a, @@a] end end B.show_vars
copy
Ruby 3.3.0
[nil, nil]
[nil, 2]
[1, 2]
[1, nil]
privacy policy