このコードの誤りを指摘してください。お願いします
class String
def count_word
ary=self.sprit(/\s+/)
return ary.size
end
end
str="Just Another Ruby Newbie"
p str.count_word
このコメントはなかったことにしてください。
投稿2015/08/17 02:29
このコードの誤りを指摘してください。お願いします
class String
def count_word
ary=self.sprit(/\s+/)
return ary.size
end
end
str="Just Another Ruby Newbie"
p str.count_word