摘要:
异常错误的分析 Traceback (most recent call last): 1: from new_point.rb:64:in `<main>' new_point.rb:27:in `[]': out of range '2' (ArgumentError) 这么一条异常 from 文 阅读全文
摘要:
Ruby中的public、protected和private 栗子1: class Person public def my_public_method 'I am a public method' end protected def my_protected_method 'I am a prot 阅读全文
摘要:
循环时的注意事项 循环做什么 停止循环的条件是什么 Ruby实现循环的方法 times while each for until loop times方法 "满地油菜花" "满地油菜花" "满地油菜花" "满地油菜花" "满地油菜花" "满地油菜花" "满地油菜花" shijianzhongdeMa 阅读全文
摘要:
条件判断 if unless case 比Python复杂,Python就一个if 32 shijianzhongdeMacBook-Pro:chapter_5 shijianzhong$ cat ad2pingcheng.rb ad = ARGV[0].to_i pingcheng = ad - 阅读全文