ivaneeo's blog

自由的力量,自由的生活。

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  669 Posts :: 0 Stories :: 64 Comments :: 0 Trackbacks
  histogram = Hash.new(0)	##给hash表设置默然值为0
histogram['key1']
histogram['key1'] = histogram['key1'] + 1
histogram['key1']

######################################
##gets 从命令行出入的文件名得到的文件的每一行文本。
while line = gets
puts line.downcase ##downcase全部转换成小写
end
posted on 2006-09-12 15:22 ivaneeo 阅读(295) 评论(0)  编辑  收藏 所属分类: ruby-宝石也锋芒

只有注册用户登录后才能发表评论。


网站导航: