{"categories":["Ruby","Ruby2.6"],"title":"Ruby 2.6 \u306e\u5909\u66f4\u70b9 - ENV, Struct, Random","published":"2018-12-19 00:00:00","url":"https://blog.tmtms.net/entry/201812/ruby26-env","author_name":"tmtms","author_url":"https://blog.hatena.ne.jp/tmtms/","provider_url":"https://hatena.blog","description":"Ruby2.6\u30a2\u30c9\u30d9\u30f3\u30c8\u30ab\u30ec\u30f3\u30c0\u30fc\u306e19\u65e5\u76ee\u306e\u8a18\u4e8b\u3067\u3059\u3002 qiita.com ENV ENV.to_h \u306b\u30d6\u30ed\u30c3\u30af\u3092\u6e21\u3059\u3068\u30ad\u30fc\u3068\u5024\u3092\u5909\u63db\u3067\u304d\u308b Struct Struct#to_h \u306b\u30d6\u30ed\u30c3\u30af\u3092\u6e21\u3059\u3068\u30ad\u30fc\u3068\u5024\u3092\u5909\u63db\u3067\u304d\u308b Struct#filter \u8ffd\u52a0 Random Random.bytes \u8ffd\u52a0 ENV ENV.to_h \u306b\u30d6\u30ed\u30c3\u30af\u3092\u6e21\u3059\u3068\u30ad\u30fc\u3068\u5024\u3092\u5909\u63db\u3067\u304d\u308b https://bugs.ruby-lang.org/issues/15143 ENV.to_h{|k,v| [k.intern, v.length]} #=> {:PATH=>348, :LANG=>11, :USER=>5, :\u2026","image_url":null,"version":"1.0","height":"190","width":"100%","blog_title":"tmtms \u306e\u30e1\u30e2","type":"rich","blog_url":"https://blog.tmtms.net/","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.tmtms.net%2Fentry%2F201812%2Fruby26-env\" title=\"Ruby 2.6 \u306e\u5909\u66f4\u70b9 - ENV, Struct, Random - tmtms \u306e\u30e1\u30e2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}