CINXE.COM
Излезе Ruby 2.4.0-preview1
<!DOCTYPE html> <html> <head><script type="text/javascript" src="/_static/js/bundle-playback.js?v=HxkREWBo" charset="utf-8"></script> <script type="text/javascript" src="/_static/js/wombat.js?v=txqj7nKC" charset="utf-8"></script> <script>window.RufflePlayer=window.RufflePlayer||{};window.RufflePlayer.config={"autoplay":"on","unmuteOverlay":"hidden"};</script> <script type="text/javascript" src="/_static/js/ruffle/ruffle.js"></script> <script type="text/javascript"> __wm.init("https://web.archive.org/web"); __wm.wombat("https://www.ruby-lang.org/bg/news/2016/06/20/ruby-2-4-0-preview1-released/","20240802231923","https://web.archive.org/","web","/_static/", "1722640763"); </script> <link rel="stylesheet" type="text/css" href="/_static/css/banner-styles.css?v=S1zqJCYt" /> <link rel="stylesheet" type="text/css" href="/_static/css/iconochive.css?v=3PDvdIFv" /> <!-- End Wayback Rewrite JS Include --> <meta charset="utf-8"> <title>Излезе Ruby 2.4.0-preview1</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta itemprop="image" content="https://web.archive.org/web/20240802231923im_/https://www.ruby-lang.org/images/header-ruby-logo@2x.png"> <meta name="description" content=""> <link rel="stylesheet" type="text/css" href="/web/20240802231923cs_/https://www.ruby-lang.org/stylesheets/normalize.css"> <link rel="stylesheet" type="text/css" href="/web/20240802231923cs_/https://www.ruby-lang.org/stylesheets/main.css"> <link rel="stylesheet" type="text/css" href="/web/20240802231923cs_/https://www.ruby-lang.org/stylesheets/pygments.css"> <link rel="stylesheet" type="text/css" href="/web/20240802231923cs_/https://www.ruby-lang.org/stylesheets/mobile.css"> <link rel="stylesheet" type="text/css" href="/web/20240802231923cs_/https://www.ruby-lang.org/stylesheets/print.css"> <link href="https://web.archive.org/web/20240802231923cs_/https://fonts.googleapis.com/css?family=Noto+Sans:400,700,400italic,700italic&subset=latin,cyrillic,greek,vietnamese" rel="stylesheet" type="text/css"> <link rel="canonical" href="https://web.archive.org/web/20240802231923/https://www.ruby-lang.org/bg/news/2016/06/20/ruby-2-4-0-preview1-released/"> <link rel="shortcut icon" type="image/x-icon" href="/web/20240802231923im_/https://www.ruby-lang.org/favicon.ico"> <link href="/web/20240802231923/https://www.ruby-lang.org/bg/feeds/news.rss" rel="alternate" title="Последните новини (RSS)" type="application/rss+xml"> <script type="text/javascript" src="/web/20240802231923js_/https://www.ruby-lang.org/javascripts/jquery.min.js"></script> <script type="text/javascript" src="/web/20240802231923js_/https://www.ruby-lang.org/javascripts/page.js"></script> </head> <body> <div id="header"> <div id="header_content" class="container"> <a href="/web/20240802231923/https://www.ruby-lang.org/bg/"> <h1>Ruby</h1> <h2>най-добрият приятел на програмиста</h2> </a> <div class="site-links"> <a href="/web/20240802231923/https://www.ruby-lang.org/bg/" class="home">Home</a> <a href="/web/20240802231923/https://www.ruby-lang.org/bg/downloads/">За сваляне</a> <a href="/web/20240802231923/https://www.ruby-lang.org/bg/documentation/">Документация</a> <a href="/web/20240802231923/https://www.ruby-lang.org/bg/libraries/">Библиотеки</a> <a href="/web/20240802231923/https://www.ruby-lang.org/bg/community/">Общност</a> <a href="/web/20240802231923/https://www.ruby-lang.org/bg/news/">Новини</a> <a href="/web/20240802231923/https://www.ruby-lang.org/bg/security/">Сигурност</a> <a href="/web/20240802231923/https://www.ruby-lang.org/bg/about/">Относно</a> <a href="#" class="menu selected">Menu</a> </div> <div id="search-box"> <form id="search-form" action="https://web.archive.org/web/20240802231923/https://www.google.com/cse"> <table class="fieldset"> <tr> <td> <input class="field" type="text" name="q" size="31" style="background: white url(//web.archive.org/web/20240802231923im_/https://www.google.com/coop/intl/bg/images/google_custom_search_watermark.gif) left no-repeat" onfocus="this.style.background='white'" onblur="if (/^\s*$/.test(this.value)) this.style.background='white url(//www.google.com/coop/intl/bg/images/google_custom_search_watermark.gif) left no-repeat'"/> </td> <td> <input type="hidden" name="cx" value="013598269713424429640:g5orptiw95w"/> <input type="hidden" name="ie" value="UTF-8"/> <input class="button" type="submit" name="sa" value="Търси"/> </td> </tr> </table> </form> </div> </div> </div> <div id="page"> <div id="main-wrapper" class="container"> <div id="main"> <div id="content-wrapper"> <h1>Излезе Ruby 2.4.0-preview1</h1> <div id="content"> <p class="post-info">Публикувана от naruse на 2016-06-20<br> Превод от Georgi Mitrev</p> <p>Радваме се да обявим излизането на Ruby 2.4.0-preview1.</p> <p>Това е първият предварителен преглед на Ruby 2.4.0. Излиза по-рано от обикновено, защото включва много новости и подобрения. Не се колебайте да <a href="https://web.archive.org/web/20240802231923/https://github.com/ruby/ruby/wiki/How-To-Report">изпращате обратна връзка</a>, тъй като все още имате възможност да повлияете на промените.</p> <h2><a href="https://web.archive.org/web/20240802231923/https://bugs.ruby-lang.org/issues/12005">Обединяване на Fixnum и Bignum в Integer</a></h2> <p>Въпреки, че <a href="https://web.archive.org/web/20240802231923/http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=59579">ISO/IEC 30170:2012</a> не уточнява детайли относно <code class="language-plaintext highlighter-rouge">Integer</code>, CRuby има два <code class="language-plaintext highlighter-rouge">Integer</code> класа - <code class="language-plaintext highlighter-rouge">Fixnum</code> и <code class="language-plaintext highlighter-rouge">Bignum</code>. Ruby 2.4. ги обединява в <code class="language-plaintext highlighter-rouge">Integer</code>.</p> <h2><a href="https://web.archive.org/web/20240802231923/https://bugs.ruby-lang.org/issues/10085">String поддръжка за Unicode case mappings</a></h2> <p><code class="language-plaintext highlighter-rouge">String/Symbol#upcase/downcase/swapcase/capitalize(!)</code> сега поддържат Unicode mappings вместо само ASCII такива.</p> <h2>Подобрения на производителността</h2> <p>Ruby 2.4 съдържа следните промени, подобряващи производителността:</p> <h3><a href="https://web.archive.org/web/20240802231923/https://bugs.ruby-lang.org/issues/12172">Array#max, Array#min</a></h3> <p><code class="language-plaintext highlighter-rouge">[x, y].max</code> и <code class="language-plaintext highlighter-rouge">[x, y].min</code> са оптимизирани да не създават временен масив при определени условия.</p> <h3><a href="https://web.archive.org/web/20240802231923/https://bugs.ruby-lang.org/issues/8110">Regexp#match?</a></h3> <p>Добавен е метода <code class="language-plaintext highlighter-rouge">Regexp#match?</code>, който изпълнява regexp match без да създава back reference object и да сменя <code class="language-plaintext highlighter-rouge">$~</code>, за да се редуцира броят на алокираните обекти.</p> <h3>Други подобрения на производителността</h3> <ul> <li><a href="https://web.archive.org/web/20240802231923/https://bugs.ruby-lang.org/issues/12274">по-бърз достъп до instance променливи</a></li> </ul> <h2>Дебъгване</h2> <h3><a href="https://web.archive.org/web/20240802231923/https://bugs.ruby-lang.org/issues/6647">Thread#report_on_exception и Thread.report_on_exception</a></h3> <p>Ruby игнорира exception-и в нишки освен ако не се join-не друга нишка. Чрез <code class="language-plaintext highlighter-rouge">report_on_exception = true</code> може да се следи ако нишка умре поради необработен exception.</p> <p>Споделете с нас каква според вас трябва да бъде стойността по подразбиране на <code class="language-plaintext highlighter-rouge">report_on_exception</code>.</p> <h3><a href="https://web.archive.org/web/20240802231923/https://bugs.ruby-lang.org/issues/8214">Показване на backtrace и зависимости при deadlock на нишки</a></h3> <p>Ruby засича deadlock-ове при чакащи нишки, но не показва достатъчно информация за дебъгване. Ruby 2.4 показва нишките заедно с техният backtrace, както и кои други нишки зависят от тях.</p> <p>Приятно ползване на Ruby 2.4.0-preview1! <a href="https://web.archive.org/web/20240802231923/https://github.com/ruby/ruby/wiki/How-To-Report">Свържете се с нас</a> с вашите коментари и преложения.</p> <h2>Важни промени от 2.3</h2> <p>Вижте <a href="https://web.archive.org/web/20240802231923/https://github.com/ruby/ruby/blob/v2_4_0_preview1/NEWS">Новини</a> и <a href="https://web.archive.org/web/20240802231923/https://github.com/ruby/ruby/blob/v2_4_0_preview1/ChangeLog">Списък с промени</a> за повече информация.</p> <h2>Сваляне</h2> <ul> <li> <p><a href="https://web.archive.org/web/20240802231923/https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0-preview1.tar.bz2">https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0-preview1.tar.bz2</a></p> <ul> <li>SIZE: 14108114 bytes</li> <li>SHA1: 7dcc42548d0724d83b6589ab98f34282845d7bcd</li> <li>SHA256: 17570f0b84215ca82252f10c167ee50bc075383c018420c6b2601ae1cade0649</li> <li>SHA512: c9873e8686eb54dbde61d6e23cd5197beebccd6cb31fd12c82763ebe1fde17095d7514d9d93c2c82b238032c98691df5479dc2d666a8a590e0fc54450ec29cb5</li> </ul> </li> <li> <p><a href="https://web.archive.org/web/20240802231923/https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0-preview1.tar.gz">https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0-preview1.tar.gz</a></p> <ul> <li>SIZE: 17605452 bytes</li> <li>SHA1: 1003a1e57547d81f4bb979c0f40f242afc284cd5</li> <li>SHA256: 80d02f49f40e7ce07b70bee7efda751b0595a349a017306e9fe8caad5da13e64</li> <li>SHA512: 4b603ab4ff9ea7e8bb8053aa4b638839d534241466d7f0e4d5bca3f2ea416694c2ea391790f1ffdc07fa538918d27707621741eb0ddc7bd00eb9d7628622787a</li> </ul> </li> <li> <p><a href="https://web.archive.org/web/20240802231923/https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0-preview1.tar.xz">https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0-preview1.tar.xz</a></p> <ul> <li>SIZE: 11155800 bytes</li> <li>SHA1: bc33085277266f5a09a143bf6817affcb77f8e7f</li> <li>SHA256: 62942c7300727469fe3d2b43e5a5c772d4836cf624a1d644bdece2afaca472c8</li> <li>SHA512: dfc2c6642d49fa95383817a6dc82c416b3218ddfdaf882d6d2e5a7da22d0a5ac142e516a57aa96214070f3c7551d275044233ac052c82d67189b01c39847aad4</li> </ul> </li> <li> <p><a href="https://web.archive.org/web/20240802231923/https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0-preview1.zip">https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0-preview1.zip</a></p> <ul> <li>SIZE: 19904781 bytes</li> <li>SHA1: 25c16ee91bbcb0224f80e20d938f5c08832973f7</li> <li>SHA256: fd588aea1558b1171f87a3dd342ee207b8995a2c0a8241d7aa15bcfa16036854</li> <li>SHA512: f2fff35ff9157a4b31177b3d6b91bdaad04c22b3c626c3a5e5ec9a31b103f9607b31c909ef27880065cfdbcfa5d6901a6db89d22e0c645666d069c5b6dd1818b</li> </ul> </li> </ul> <h2>Коментар</h2> <p>За повече информация и план за следващи версии:</p> <p><a href="https://web.archive.org/web/20240802231923/https://bugs.ruby-lang.org/projects/ruby-master/wiki/ReleaseEngineering24">ReleaseEngineering24</a></p> </div> </div> <hr class="hidden-modern"/> <div id="sidebar-wrapper"> <div id="sidebar"> <div class="navigation"> <h3><strong>Последни новини</strong></h3> <ul class="menu"> <li><a href="/web/20240802231923/https://www.ruby-lang.org/bg/news/2016/06/20/ruby-2-4-0-preview1-released/">Излезе Ruby 2.4.0-preview1</a></li> <li><a href="/web/20240802231923/https://www.ruby-lang.org/bg/news/2016/04/26/ruby-2-3-1-released/">Излезе Ruby 2.3.1</a></li> <li><a href="/web/20240802231923/https://www.ruby-lang.org/bg/news/2016/04/26/ruby-2-2-5-released/">Излезе Ruby 2.2.5</a></li> <li><a href="/web/20240802231923/https://www.ruby-lang.org/bg/news/2016/04/01/ruby-2-1-10-released/">Излезе Ruby 2.1.10</a></li> <li><a href="/web/20240802231923/https://www.ruby-lang.org/bg/news/2016/03/30/ruby-2-1-9-released/">Излезе Ruby 2.1.9</a></li> </ul> </div> <h3>Новини</h3> <p><a href="/web/20240802231923/https://www.ruby-lang.org/bg/feeds/news.rss">Последните новини (RSS)</a></p> </div> </div> <hr class="hidden-modern"/> </div> </div> </div> <div class="container"> <div id="footer"> <div class="site-links"> <a href="/web/20240802231923/https://www.ruby-lang.org/bg/" class="home">Home</a> <a href="/web/20240802231923/https://www.ruby-lang.org/bg/downloads/">За сваляне</a> <a href="/web/20240802231923/https://www.ruby-lang.org/bg/documentation/">Документация</a> <a href="/web/20240802231923/https://www.ruby-lang.org/bg/libraries/">Библиотеки</a> <a href="/web/20240802231923/https://www.ruby-lang.org/bg/community/">Общност</a> <a href="/web/20240802231923/https://www.ruby-lang.org/bg/news/">Новини</a> <a href="/web/20240802231923/https://www.ruby-lang.org/bg/security/">Сигурност</a> <a href="/web/20240802231923/https://www.ruby-lang.org/bg/about/">Относно</a> </div> <p> Този сайт на други езици: <a href="/web/20240802231923/https://www.ruby-lang.org/bg/">Български</a>, <a href="/web/20240802231923/https://www.ruby-lang.org/de/">Deutsch</a>, <a href="/web/20240802231923/https://www.ruby-lang.org/en/">English</a>, <a href="/web/20240802231923/https://www.ruby-lang.org/es/">Español</a>, <a href="/web/20240802231923/https://www.ruby-lang.org/fr/">Français</a>, <a href="/web/20240802231923/https://www.ruby-lang.org/id/">Bahasa Indonesia</a>, <a href="/web/20240802231923/https://www.ruby-lang.org/it/">Italiano</a>, <a href="/web/20240802231923/https://www.ruby-lang.org/ja/">日本語</a>, <a href="/web/20240802231923/https://www.ruby-lang.org/ko/">한국어</a>, <a href="/web/20240802231923/https://www.ruby-lang.org/pl/">polski</a>, <a href="/web/20240802231923/https://www.ruby-lang.org/pt/">Português</a>, <a href="/web/20240802231923/https://www.ruby-lang.org/ru/">Русский</a>, <a href="/web/20240802231923/https://www.ruby-lang.org/tr/">Türkçe</a>, <a href="/web/20240802231923/https://www.ruby-lang.org/vi/">Tiếng Việt</a>, <a href="/web/20240802231923/https://www.ruby-lang.org/zh_cn/">简体中文</a>, <a href="/web/20240802231923/https://www.ruby-lang.org/zh_tw/">繁體中文</a>. </p> <p><a href="/web/20240802231923/https://www.ruby-lang.org/bg/about/website/">Този сайт</a> се поддържа от членове на Ruby обществото.</p> </div> </div> </body> </html> <!-- FILE ARCHIVED ON 23:19:23 Aug 02, 2024 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 21:40:56 Nov 30, 2024. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). --> <!-- playback timings (ms): captures_list: 0.482 exclusion.robots: 0.024 exclusion.robots.policy: 0.014 esindex: 0.009 cdx.remote: 6.786 LoadShardBlock: 463.628 (3) PetaboxLoader3.datanode: 83.495 (4) PetaboxLoader3.resolve: 372.739 (3) load_resource: 106.624 -->