{"id":75896,"date":"2019-12-26T09:56:50","date_gmt":"2019-12-26T00:56:50","guid":{"rendered":"https:\/\/www.softantenna.com\/wp\/?p=75896"},"modified":"2019-12-26T09:56:50","modified_gmt":"2019-12-26T00:56:50","slug":"ruby-2-7-0-released","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/ruby-2-7-0-released\/","title":{"rendered":"Ruby 2.7.0\u304c\u30ea\u30ea\u30fc\u30b9 - Pattern Matching\u3084REPL\u306e\u6539\u826f\u3001Compaction GC\u306e\u5c0e\u5165\u306a\u3069"},"content":{"rendered":"<p><img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2019\/12\/s_20191226_94310.jpg\" alt=\"S 20191226 94310\" title=\"s_20191226_94310.jpg\" border=\"0\" width=\"942\" height=\"579\" \/><\/p>\n<p>Ruby\u958b\u767a\u30c1\u30fc\u30e0\u306f12\u670825\u65e5\u3001Ruby 2.7\u30b7\u30ea\u30fc\u30ba\u306e\u6700\u521d\u306e\u5b89\u5b9a\u7248\u3068\u306a\u308b\u300cRuby 2.7.0\u300d\u3092\u30ea\u30ea\u30fc\u30b9\u3057\u307e\u3057\u305f(<a href=\"https:\/\/www.ruby-lang.org\/ja\/news\/2019\/12\/25\/ruby-2-7-0-released\/\">ruby-lang.org<\/a>)\u3002\u73fe\u5728\u516c\u5f0f\u30b5\u30a4\u30c8\u3088\u308a\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Ruby 2.7\u306f\u6bce\u5e74\u30af\u30ea\u30b9\u30de\u30b9\u306b\u516c\u958b\u3055\u308c\u3066\u3044\u308bRuby\u306e\u30e1\u30b8\u30e3\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u7248\u3067\u3001\u591a\u304f\u306e\u65b0\u3057\u3044\u6a5f\u80fd\u3084\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u6539\u5584\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>Ruby 2.7\u3067\u306f\u3001\u95a2\u6570\u578b\u8a00\u8a9e\u3067\u5e83\u304f\u4f7f\u308f\u308c\u3066\u3044\u308bPattern Matching(\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1)\u3068\u3044\u3046\u6a5f\u80fd\u306e\u5b9f\u9a13\u7684\u306a\u5c0e\u5165\u304c\u884c\u308f\u308c\u3001\u8907\u96d1\u306a\u6761\u4ef6\u306e\u6bd4\u8f03\u304c\u5b8c\u7d50\u306b\u8a18\u8ff0\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre>\nrequire&nbsp;\"json\"\n\njson&nbsp;=&nbsp;&lt;&lt;END\n{\n&nbsp;&nbsp;\"name\":&nbsp;\"Alice\",\n&nbsp;&nbsp;\"age\":&nbsp;30,\n&nbsp;&nbsp;\"children\":&nbsp;[{&nbsp;\"name\":&nbsp;\"Bob\",&nbsp;\"age\":&nbsp;2&nbsp;}]\n}\nEND\n\ncase&nbsp;JSON.parse(json,&nbsp;symbolize_names:&nbsp;true)\nin&nbsp;{name:&nbsp;\"Alice\",&nbsp;children:&nbsp;[{name:&nbsp;\"Bob\",&nbsp;age:&nbsp;age}]}\n&nbsp;&nbsp;p&nbsp;age&nbsp;#=&gt;&nbsp;2\nend\n<\/pre>\n<p>\u307e\u305f\u3001REPL\u306e\u8907\u6570\u884c\u7de8\u96c6\u6628\u65e5\u306e\u30b5\u30dd\u30fc\u30c8\u3084rodc\u9023\u643a\u6a5f\u80fd\u306e\u8ffd\u52a0\u3001\u65ad\u7247\u5316\u3057\u305f\u30e1\u30e2\u30ea\u3092\u30c7\u30d5\u30e9\u30b0\u3059\u308bCompaction GC\u306e\u5c0e\u5165\u306a\u3069\u304c\u884c\u308f\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u4ed6\u3001\u30ad\u30fc\u30ef\u30fc\u30c9\u5f15\u6570\u306e\u901a\u5e38\u306e\u5f15\u6570\u304b\u3089\u306e\u5206\u96e2\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d6\u30ed\u30c3\u30af\u306e\u4eee\u5f15\u6570\u3068\u3057\u3066\u306e\u756a\u53f7\u6307\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u8a66\u9a13\u7684\u5c0e\u5165\u3001\u958b\u59cb\u5024\u7701\u7565\u7bc4\u56f2\u5f0f\u306e\u8a66\u9a13\u7684\u5c0e\u5165\u3001\u5404\u8981\u7d20\u306e\u51fa\u73fe\u56de\u6570\u3092\u30ab\u30a6\u30f3\u30c8\u3059\u308bEnumerable#tally\u306e\u8ffd\u52a0\u3001\u30ec\u30b7\u30fc\u30d0\u3092self\u3068\u3057\u3066private\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u3092\u8a31\u5bb9\u3059\u308b\u5909\u66f4\u3001Enumerator::Lazy#eager\u306e\u8ffd\u52a0\u3001JIT\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u6539\u826f\u306a\u3069\u3001\u3055\u307e\u3056\u307e\u306a\u65b0\u6a5f\u80fd\u3084\u6539\u826f\u304c\u884c\u308f\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u5909\u66f4\u70b9\u306e\u8a73\u7d30\u306f<a href=\"hhttps:\/\/github.com\/ruby\/ruby\/blob\/v2_7_0\/NEWS\">NEWS<\/a>\u3084<a href=\"https:\/\/github.com\/ruby\/ruby\/compare\/v2_6_0...v2_7_0\">\u30b3\u30df\u30c3\u30c8\u30ed\u30b0<\/a>\u3067\u78ba\u8a8d\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<table>\n<tr>\n<th rowspan='4' style='white-space: nowrap;'><img decoding=\"async\" style=\"max-width: 52px; height: auto;\" src=\"\/assets\/pc-301b359275e3cfd18baf480ee6dd6d484a27fdc417431ff7dd5cd26d895260b0.png\" alt=\"Pc\" \/><\/th>\n<th style='white-space: nowrap;'>\u30bf\u30a4\u30c8\u30eb<\/th>\n<td>Ruby<\/td>\n<\/tr>\n<tr>\n<th style='white-space: nowrap;'>\u516c\u5f0f\u30b5\u30a4\u30c8<\/th>\n<td><a href=\"http:\/\/www.ruby-lang.org\/ja\/\">http:\/\/www.ruby-lang.org\/ja\/<\/a><\/td>\n<\/tr>\n<tr>\n<th style='white-space: nowrap;'>\u30bd\u30d5\u30c8\u30a2\u30f3\u30c6\u30ca<\/th>\n<td><a href=\"https:\/\/softantenna.com\/softwares\/1964-ruby\">https:\/\/softantenna.com\/softwares\/1964-ruby<\/a><\/td>\n<\/tr>\n<tr>\n<th style='white-space: nowrap;'>\u8aac\u660e<\/th>\n<td>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u30b9\u30af\u30ea\u30d7\u30c8\u8a00\u8a9e\u3002<\/td>\n<\/tr>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>Ruby\u958b\u767a\u30c1\u30fc\u30e0\u306f12\u670825\u65e5\u3001Ruby 2.7\u30b7\u30ea\u30fc\u30ba\u306e\u6700\u521d\u306e\u5b89\u5b9a\u7248\u3068\u306a\u308b\u300cRuby 2.7.0\u300d\u3092\u30ea\u30ea\u30fc\u30b9\u3057\u307e\u3057\u305f(ruby-lang.org)\u3002\u73fe\u5728\u516c\u5f0f\u30b5\u30a4\u30c8\u3088\u308a\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 R [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":75897,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[75],"tags":[154],"class_list":["post-75896","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-ruby"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/75896","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=75896"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/75896\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/75897"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=75896"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=75896"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=75896"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}