Constants cannot be defined in methods
suggest changedef say_hi
MESSAGE = "Hello"
puts MESSAGE
end
The above code results in an error: SyntaxError: (irb):2: dynamic constant assignment
.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents