1.File.open("filename")
2.File.open("filename").readLines
3.array=[...]
4.array1 - array2
5.array.length array.size
6.array[(-)index]
7.array[f..t]
8.array[f...t]
9.array.delete_at(index)
10.array.slice!(f..t)
11.array.empty?
12.a.push(e)
13.a << e | a << [.....]
14.a.pop
15.a.shift
16.a.unshift(e)
17.a.methods
18.ARGV
19."".downcase
20.a.each do |e|
??????? ...
???? end
21.生成新Array
class="ruby">[1,2,3].collect do |e| e*10 end
?
[1,2,3].collect { |e| e * 10}
22. "....".split(reg)
23.a.include?(xxx)
24.
[1,2,3,4,5,6,7,8].reject {|e| e != 2}
25.装在文件 load 'xxx.rb'
26.__FILE__和$0是当前.rb文件名
27.a.any?