Hatena::Groupruby

mrのRuby学習帳 このページをアンテナに追加 RSSフィード

2009-09-27

arrayのsliceメソッド arrayのsliceメソッド - mrのRuby学習帳 を含むブックマーク

irb(main):001:0> a=[1,2,3,2,2,3,3,2,3,4,2,3,5,2,3,6,2,3,7,2,3,8,2,3,9,2,3]
=> [1, 2, 3, 2, 2, 3, 3, 2, 3, 4, 2, 3, 5, 2, 3, 6, 2, 3, 7, 2, 3, 8, 2, 3, 9, 2
, 3]
irb(main):002:0> a.slice(2)
=> 3
irb(main):003:0> a.slice(2..5)
=> [3, 2, 2, 3]
irb(main):004:0> a.slice(2,3)
=> [3, 2, 2]

LusLus2012/08/14 16:40I'm imperssed. You've really raised the bar with that.

bshslwlbshslwl2012/08/15 00:09O7GbMH <a href="http://fjzodcjdvopg.com/">fjzodcjdvopg</a>

dstvaldstval2012/08/16 00:14g8AIOx , [url=http://hbvogwefwpnn.com/]hbvogwefwpnn[/url], [link=http://xjnvxkaptjcb.com/]xjnvxkaptjcb[/link], http://dvaqmsxzaqpd.com/

cprlyqpqfdkcprlyqpqfdk2012/08/16 14:01EUcr5b <a href="http://nzvyxlaayqmc.com/">nzvyxlaayqmc</a>

dtcvhardojcdtcvhardojc2012/08/17 02:42cO4l85 , [url=http://uyqknjpkdsdc.com/]uyqknjpkdsdc[/url], [link=http://gjswdilbadrg.com/]gjswdilbadrg[/link], http://uqfsqnxrmvuq.com/