Ruby - String Operations
Identify the error in this Ruby code:
str = "hello" str.freeze! str << " world"
str = "hello" str.freeze! str << " world"
freeze method, but no freeze! method.freeze! causes a NoMethodError; correct method is freeze.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions