{"image_url":"https://cdn.blog.st-hatena.com/images/theme/og-image-1500.png","categories":["Ruby"],"author_name":"kakku22","provider_name":"Hatena Blog","url":"https://kakakakakku.hatenablog.com/entry/2015/05/12/225609","title":"Ruby \u306e Array.new \u3092 size \u3068 val \u3067\u521d\u671f\u5316\u3059\u308b","height":"190","description":"\u4eca\u65e5\u3082 Ruby Gold \u306e\u30b5\u30f3\u30d7\u30eb\u554f\u984c\u3092\u89e3\u3044\u3066\u3066\uff0cArray.new \u306e\u6319\u52d5\u3067\u77e5\u3089\u306a\u304b\u3063\u305f\u3068\u3053\u308d\u304c\u3042\u3063\u305f\uff01 \u554f\u984c \uff082015\u5e744\u67088\u65e5\uff09 IT\u30c8\u30ec\u30e1 Ruby\u6280\u8853\u8005\u8a8d\u5b9a\u3010Gold\u3011\u8a66\u9a13 \u2212 \uff20IT\u81ea\u5206\u6226\u7565\u7814\u7a76\u6240 ary = Array.new(3, \"a\") ary[0].next! p ary # >> [\"b\", \"b\", \"b\"] Array.new(size = 0, val = nil) new(size = 0, val = nil) \u3067\u521d\u671f\u5316\u3059\u308b\u3068\u540c\u4e00\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u306a\u308b\uff0e ary = Array.new(3, \"a\") p ary[0].equal?(ary[1]) p ar\u2026","type":"rich","blog_url":"https://kakakakakku.hatenablog.com/","author_url":"https://blog.hatena.ne.jp/kakku22/","published":"2015-05-12 22:56:09","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkakakakakku.hatenablog.com%2Fentry%2F2015%2F05%2F12%2F225609\" title=\"Ruby \u306e Array.new \u3092 size \u3068 val \u3067\u521d\u671f\u5316\u3059\u308b - kakakakakku blog\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","width":"100%","blog_title":"kakakakakku blog","version":"1.0"}