Q: What value gets printed
Answered
quizz 5/36
class A def greets @greet = "hello" end end class B < A def greets @greet = "hey" super end end p B.new.greets
copy
Ruby 3.3.0
"hello"
"hey"
NoMethodError: undefined method `greets'
uninitialized constant B (NameError)
privacy policy