Hatena::Grouprubyist

krystal: プログラミング超初心者(文系)

2009-01-08 (Thu)たのしいRuby練習問題

P - 306 練習問題(3)

21:43

  • Unixのduコマンドのように、再帰的に掘り下げて調べ表示するメソッドduを定義してみよう。
def du(path)
  size = FileTest.size(path)
  if FileTest.directory?(path)
    Dir.open(path){|dir|
      dir.each{|name|
        next if name == "."
        next if name == ".."
        size += du(File.join(path, name))
      }
    }
  end
  printf("%8d %s\n", size, path)
  return size  #size(数字)を返さないと、↑のduはprintfを返すことになるからnil。だから、size+nilは怒られる
end

KaedonKaedon2016/05/07 15:52Hi Gina!I have a question not related to this post…I went back to read some of your early pregancy posts and you were saying that you ate a lot of pineapple because it would help with implantation (and I guess it did ). However now I’m also reading that you sh#7udn&o821l;t eat pineapple because it might stimulate labor. Have you ever heard of this? I still have one waiting for me at home and now I’m not sure if it’s good to eat it or bad to eat it!

CaidenCaiden2016/05/08 22:32Ce taranca esti in pozele alea Florica! Hi, hi, hi!Auzi, dar dupa <a href="http://omrxjg.com">prtoizopia</a> "Sa facem loc pentru porc" de ce apare o poza cu nasu tau de cununie, fostul tau sef, Adrian? :)

ConyersConyers2016/05/09 10:37Thanks for your response and for reading the site. You are correct, we just see the numbers not every game. Decision making is something he needs to improve upon going forward. <a href="http://fdsaci.com">Boaeeendhd</a> mistakes need to stop. I’m posting another story today about this and giving you credit for bringing this to my attention. His defense was a bigger issue than his batting last year and we need to keep that part of his game in mind.

iderabafiderabaf2018/02/24 12:12http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

uzopufouzopufo2018/02/24 12:21http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

igigesehoxuoyigigesehoxuoy2018/02/24 12:28http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

hakeyafoqubhakeyafoqub2018/02/24 12:36http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

amudiqoifiamudiqoifi2018/02/24 12:45http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

efatowfecefatowfec2018/02/24 12:48http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

uitacmiozimekuitacmiozimek2018/02/24 12:49http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

actuqimayitadactuqimayitad2018/02/24 12:54http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ezopadaxozezopadaxoz2018/02/24 13:01http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

erjenugaterjenugat2018/02/24 13:03http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

aveqxaposapadaveqxaposapad2018/02/24 13:06http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

isezijupisezijup2018/02/24 13:09http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

uhaniyehiduuhaniyehidu2018/02/24 13:09http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ipisofekeisipisofekeis2018/02/24 13:23http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

owococodoowococodo2018/02/24 13:25http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

euhnebuzoficeuhnebuzofic2018/02/25 10:59http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

befubedulaogwbefubedulaogw2018/02/25 11:18http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

inewokiwitwinewokiwitw2018/02/27 04:34http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

izamoiqaiokuqizamoiqaiokuq2018/02/27 04:40http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

udeyobiveudeyobive2018/02/27 04:45http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

acariyiroacariyiro2018/02/27 04:48http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

onifiruxowijaonifiruxowija2018/02/27 04:50http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

enexasahaenexasaha2018/02/27 04:56http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ovvomibuniaovvomibunia2018/02/27 05:00http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ifakvavyixiifakvavyixi2018/02/27 05:09http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ovageyaetuovageyaetu2018/02/27 05:11http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

usayimufohebeusayimufohebe2018/02/27 05:21http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

iaviheukousabiaviheukousab2018/02/27 05:21http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

irawaecuheirawaecuhe2018/02/27 05:24http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

inudijadirpejinudijadirpej2018/02/27 05:25http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ayiufufodupayiufufodup2018/02/27 05:36http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

uvepibebuvepibeb2018/02/27 05:37http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ugosbijopiugosbijopi2018/02/28 04:32http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

izonuhukgazoizonuhukgazo2018/02/28 04:48http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

aulumidiaxaulumidiax2018/04/20 01:56http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

oreetosemcahoreetosemcah2018/04/20 02:15http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

ditunebagutarditunebagutar2018/04/20 02:17http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

iepowiviruweiepowiviruwe2018/04/20 02:30http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

gihdagigihdagi2018/04/20 02:31http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

etbixinogeetbixinoge2018/04/20 02:51http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

ozuracotasigozuracotasig2018/04/20 02:52http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

ijehupuhedijehupuhed2018/04/20 03:06http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

asiisekiasiiseki2018/04/20 03:07http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

getapabiyogetapabiyo2018/04/20 03:25http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

irhetakihiuiirhetakihiui2018/04/20 03:27http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

awuguvarawuguvar2018/04/20 03:34http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

ooxivalieziooxivaliezi2018/04/20 03:39http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

isowuwezoisowuwezo2018/04/20 03:41http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

emoryajeemoryaje2018/04/20 03:49http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

agihoqanamiqeagihoqanamiqe2018/04/20 04:00http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

ooojitoliooojitoli2018/04/20 04:01http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

unjaaluituqunjaaluituq2018/04/20 04:14http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

uhuyajieluhuyajiel2018/04/20 04:16http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

obilqiwuobilqiwu2018/04/20 04:32http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

nobacitizeznobacitizez2018/04/20 04:35http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

icubicaicubica2018/04/20 04:47http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

oginikuyuoginikuyu2018/04/20 04:49http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

uciyagnuuciyagnu2018/04/20 04:54http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

earitifearitif2018/04/20 04:54http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

emimoqokiyemimoqokiy2018/04/20 05:08http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

auifekiqoqiauifekiqoqi2018/04/20 05:08http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

ipeepecvaxipeepecvax2018/04/20 23:35http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

staletaahdstaletaahd2018/07/31 10:20<a href="http://rabbitinahat.com">cialis online coupon</a> cialis 5mg best price http://rabbitinahat.com

italethdrhitalethdrh2018/08/01 07:15<a href="http://missreplicawatches.com">cialis online canada pharmacy</a> buy cialis online usa http://missreplicawatches.com

gtalettnlcgtalettnlc2018/08/02 06:29<a href="http://gigawatt6.com">order cialis from india</a> cialis coupons http://gigawatt6.com

ztaletiqhvztaletiqhv2018/08/03 03:33<a href="http://motechautomotive.com">canadian online pharmacy generic cialis</a> buy cialis uk http://motechautomotive.com

utalettxptutalettxpt2018/08/04 04:02<a href="http://motechautomotive.com">best place to buy cialis</a> cheap cialis online uk http://motechautomotive.com

ctaletnqymctaletnqym2018/08/05 11:06<a href="http://kqcopy.com">buy viagra now</a> buy real viagra online http://kqcopy.com

ptaletshhoptaletshho2018/08/06 18:36<a href="http://kqcopy.com">order viagra online without prescription</a> order viagra with paypal http://kqcopy.com

ktaletfpvwktaletfpvw2018/08/07 12:08<a href="http://motechautomotive.com">cialis pills online</a> cialis pill http://motechautomotive.com

utaletrdxbutaletrdxb2018/08/09 01:40<a href="http://mphasset.com">order viagra onlines</a> generic viagra pills http://mphasset.com