use regular expression check whether a string is a number
end
1 down vote accept
You forgot to include the class you were testing against:
"1" . is_a ?( Integer ) # false
1.is _a ?( Integer ) # true
查看更多关于use regular expression check whether a string is a的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did43580