{"id":102254,"date":"2022-09-10T10:33:23","date_gmt":"2022-09-10T01:33:23","guid":{"rendered":"https:\/\/softantenna.com\/blog\/?p=102254"},"modified":"2022-09-10T10:33:23","modified_gmt":"2022-09-10T01:33:23","slug":"ruby-3-2-0-preview-2-released","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/ruby-3-2-0-preview-2-released\/","title":{"rendered":"Ruby 3.2.0 Preview 2\u304c\u30ea\u30ea\u30fc\u30b9"},"content":{"rendered":"<p><img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2022\/09\/s_20220910_102501.jpg\" alt=\"S 20220910 102501\" title=\"s_20220910_102501.jpg\" border=\"0\" width=\"1090\" height=\"618\" \/><\/p>\n<p>Ruby\u958b\u767a\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f9\u67089\u65e5\u3001Ruby 3.2\u30b7\u30ea\u30fc\u30ba\u306e2\u756a\u76ee\u30d7\u30ec\u30d3\u30e5\u30fc\u7248\u3067\u3042\u308b\u300cRuby 3.2.0 Preview 2\u300d\u3092\u30ea\u30ea\u30fc\u30b9\u3057\u307e\u3057\u305f(<a href=\"https:\/\/www.ruby-lang.org\/en\/news\/2022\/09\/09\/ruby-3-2-0-preview2-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 3.2\u306f\u6bce\u5e7412\u6708\u306b\u516c\u958b\u3055\u308c\u308bRuby\u306e\u30e1\u30b8\u30e3\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u7248\u3067\u3001\u591a\u6570\u306e\u65b0\u6a5f\u80fd\u304c\u8ffd\u52a0\u3055\u308c\u308b\u4e88\u5b9a\u3067\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001WASI\u30d9\u30fc\u30b9\u306eWebAssembly\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3001Web\u30d6\u30e9\u30a6\u30b6\u3001Serverless Edge\u74b0\u5883\u3001\u305d\u306e\u4ed6\u306eWebAssembly\/WASI\u30a8\u30f3\u30d9\u30c3\u30c0\u3067CRuby\u30d0\u30a4\u30ca\u30ea\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u6b63\u898f\u8868\u73fe\u30de\u30c3\u30c1\u30f3\u30b0\u306b\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u3092\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u3001\u9069\u5207\u306bRegexp.timeout\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001DoS\u306e\u30ea\u30b9\u30af\u3092\u9632\u6b62\u3001\u307e\u305f\u306f\u5927\u5e45\u306b\u7de9\u548c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002Regexp.timeout\u306f\u30b0\u30ed\u30fc\u30d0\u30eb\u306a\u8a2d\u5b9a\u3067\u3001\u4e00\u90e8\u306e\u6b63\u898f\u8868\u73fe\u306b\u3060\u3051\u7570\u306a\u308b\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u3092\u8a2d\u5b9a\u3057\u305f\u3044\u5834\u5408\u3001Regexp.new\u306etimeout\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre>\nRegexp.timeout = 1.0\n\nlong_time_re = Regexp.new(\"^a*b?a*$\", timeout: nil) # \u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u306a\u3057\n\nlong_time_re =~ \"a\" * 50000 + \"x\" # \u5272\u308a\u8fbc\u307e\u308c\u306a\u3044\n<\/pre>\n<p>\u305d\u306e\u4ed6Find pattern\u306e\u5b9f\u9a13\u7684\u6a5f\u80fd\u304b\u3089\u306e\u6607\u683c\u3084\u3001libyaml\u3001libffi\u306e\u3088\u3046\u306a\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u88fd\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u540c\u68b1\u306e\u5ec3\u6b62\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u6539\u5584\u3001\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306a\u3069\u591a\u6570\u306e\u5909\u66f4\u304c\u884c\u308f\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>3.1\u304b\u3089\u306e\u5909\u66f4\u70b9\u3092\u542b\u3081\u8a73\u7d30\u306f<a href=\"https:\/\/www.ruby-lang.org\/en\/news\/2022\/09\/09\/ruby-3-2-0-preview2-released\/\">\u3053\u3061\u3089<\/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\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f9\u67089\u65e5\u3001Ruby 3.2\u30b7\u30ea\u30fc\u30ba\u306e2\u756a\u76ee\u30d7\u30ec\u30d3\u30e5\u30fc\u7248\u3067\u3042\u308b\u300cRuby 3.2.0 Preview 2\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 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":102255,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[75],"tags":[154],"class_list":["post-102254","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\/102254","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=102254"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/102254\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/102255"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=102254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=102254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=102254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}