in erb
我不能在拼音中使用str拆分。
problem
帮帮我!
发布于 2016-01-25 14:38:59
看看第二行(your link)的消息,上面说未定义的方法'split‘for nil:NilClass,这意味着你是在nil类上调用split,而不是在string上。只要在你的irb上运行'hello world'.split(' '),你就会得到["hello", "world"]。
split
string
irb
'hello world'.split(' ')
["hello", "world"]
https://stackoverflow.com/questions/34729274
相似问题