新手问题 请教一下菜鸟问题

chankaward · 2012年10月17日 · 最后由 diudiutang 回复于 2012年10月17日 · 2096 次阅读
puts "You can tpye everything you want in here: "
words_input = [ ]
while (input = gets.chomp) != "" 
  words_input << input  # 请问这里的 << 是什么意思呢?
end
puts 
puts words_input.sort
匿名 #1 2012年10月17日

我一直理解为追加。。。,把 input,追加到数组 words_input 里。。。嘎嘎

需要 登录 后方可回复, 如果你还没有账号请 注册新账号