a = [1,2,3]b = [4,5]a << b# 变量a结果为:[1,2,3,[4,5]]
a = [1,2,3]b = 4a << b# 变量a结果为:[1,2,3,4]
a = [1,2,3]b = [4,5]a += b# 变量a结果为:[1,2,3,4,5]
【实 × 新 × 奇】http://www.lycom.de/ 最新报道Ruby语言、Rails框架、Ubuntu、MacOSX和软件技术信息
订阅 full-text RSS 或者 comments RSS.
Interesting links can be found at del.icio.us or by subscribing to my del.icio.us feed
Powered by SimpleLog
Comments
There are 0 comments on this post. Post yours →
Post a comment
Required fields in bold.