摘要:
原文 http://www.wellho.net/mouth/985_Equality-in-Ruby-eql-and-equal-.html Equality in Ruby - == eql? and equal? The == comparison checks whether two val 阅读全文
摘要:
官方文档是 \Z - Matches end of string. If string ends with a newline, it matches just before newline \z - Matches end of string \Z - Matches end of string. 阅读全文
摘要:
# retry用于处理异常中的begin/end代码块中,如果发生异常会重新运行 begin 和 rescue 之间的代码#当retry 被调用的话,begin 和 rescue 之间所有的代码都会被重新跑一次,并不会只跑片段代码或只跑发生异常的代码(0..5).each do |i| begin 阅读全文