我有一个像下面这样的字符串,
STRING_FIRST = "Abcd. Efgh. ijkl"
我需要在 ruby 中将上述字符串声明为常量。但它在第一个点(。)上给出了编译时间错误。
任何人都可以帮忙。
更新实际代码类似。
class class_name << Test::Unit:TestCase
include module1
STRING_FIRST = "Abcd. Efgh. ijkl"
def method1
xxx
end
end