Ruby Gold Practice Questions - Ruby Association Certified Ruby Programmer Gold Version 3 Exam

Access More Questions
Given: module M refine String do def shout upcase + "!" end end end def call_shout(s) s.shout end using M puts call_shout("hi") What happens?
Correct Answer:
It raises NoMethodError because the refinement is not active inside call_shout

Access more questions from this quiz

Continue to Ruby Gold Practice Questions - Ruby Association Certified Ruby Programmer Gold version 3 Exam for more practice questions and the full quiz experience.

Access More Questions