Ruby 3.1.0 रिलीज़
(ruby-lang.org)- YJIT मर्ज: Shopify द्वारा बनाया गया नया in-process JIT compiler
→ Lazy Basic Block Versioning(LBBV) आर्किटेक्चर
→ warm-up speed और performance में सुधार, लगभग 22%~39%
→ डिफ़ॉल्ट रूप से निष्क्रिय; --yjit से उपयोग संभव
- नया लिखा गया debug.gem शामिल
→ debugging performance में सुधार
→ remote debugging सपोर्ट
→ VSCode/Chrome जैसे debugging frontend सपोर्ट
→ multi-process/multi-thread debugging
→ colorful REPL उपलब्ध
→ Record & Replay
- error_highlight gem जोड़ा गया
→ backtrace में error की विस्तृत location दिखाता है
- IRB में auto-completion फीचर जोड़ा गया
→ अगर documentation installed है, तो auto-completion के समय बगल में documentation दिखाता है
- भाषा
→ Hash literal और keyword arguments में value omission संभव
⇨ {x: x, y: y} ko {x:, y:} likha ja sakta hai
⇨ foo(x: x, y: y) ko foo(x:, y:) likha ja sakta hai
→ pattern matching में Pin operator(^) के साथ expression का उपयोग संभव
⇨ Prime.each_cons(2).lazy.find_all{_1 in [n, ^(n + 2)]}.take(3).to_a
→ one-line pattern matching में parentheses छोड़े जा सकते हैं
⇨ [0, 1] => _, x
⇨ {y: 2} => y:
1 टिप्पणियां
हर साल क्रिसमस पर रिलीज़ करने की परंपरा के अनुसार, इस साल भी
Ruby 3.0.0 रिलीज़ https://hi.news.hada.io/topic?id=3471
Ruby 2.7.0 रिलीज़ https://hi.news.hada.io/topic?id=1149