2013年10月22日
摘要: nil? empty? blank?的区别1nil?:check if it exists and that it is valid.In ruby,all classes inherit from the Object class.nil? is a method of Object.跟其他语言不同的是,其他语言会把nil当成是null,但是nil在ruby中指向的是一个class NilClass。所以nil.nil?=truecool_people = {:conan_the_destroyer => "man", :red_sonja => " 阅读全文
posted @ 2013-10-22 12:59 soulspirit 阅读(362) 评论(0) 推荐(0)