åã«Rubyã§try-with-resourcesã使ãããã¨ãã話ãæ¸ãã¦ãã®ã¨ãã«ãªãªã¼ã¹ããgemããããã人é¡ã®å®å ¨ã«ã»ä¾¿å©ã«ãªã½ã¼ã¹ã解æ¾ãããã¨ãã欲æ±ã«ã¯ééããªãã try-with-resources ã¯ä¾¿å©ãªãã ãã©æ¬ ç¹ããªãããã§ã¯ãªãã¦ããªã½ã¼ã¹ã®ç¢ºä¿ã¨è§£æ¾ãä¸ã¶æã§ã¾ã¨ãã¦ãããªãã¨ãã¹ããæ·±ããªããè¤æ°ç®æã«åãã¦æ¸ããªããã¹ãã2段ã«ãªã£ã¦ãã¾ãã ããã¯ããã§æ´çãããã³ã¼ããæ¸ãå§åã«ãªãã®ã§æªããªãé¢ããããã ãã©ãã¨ã¯ããããã¡ãã£ã¨èªç±ã«ãããããããæ¹æ³ã¯ç¡ãããããã¨ãã話ã defer ãããGolangã® defer ã便å©ãããdefer foobar ã£ã¦æ¸ãã¨ãã¨ããã®ã¹ã³ã¼ããå¤ããã¨ãã«èªåçã« foobar ã®å 容ãå®è¡ããããããã¹ã³ã¼ãã®ã©ãã«ä½åº¦æ¸ãã¦ããããããã¯ä¾¿å©ã # Golangã®deferã®ã¾ã¾Rubyã«ãã£ã¦ã
{{#tags}}- {{label}}
{{/tags}}