A new version of Ruby is coming with new features & performance improvements. Would you like to keep up with the changes? Letâs have a look! Endless Ranges Ruby 2.5 & older versions already support one form of endless range (with Float::INFINITY), but Ruby 2.6 takes this to the next level. The new endless range looks like this: (1..) This is different from a regular range because it doesnât have a
RubyConf 2018 Los Angeles
CVE-2018-16396: Array#pack ããã³ String#unpack ã®ä¸é¨ã®ãã©ã¼ãããæå®ã«ããã¦taintãã©ã°ãä¼æããªãèå¼±æ§ã«ã¤ã㦠Posted by usa on 17 Oct 2018 Array#pack ããã³ String#unpack ã®ä¸é¨ã®ãã©ã¼ãããæå®ã«ããã¦ãå ãã¼ã¿ã® taint ãã©ã°ãé©åã«åºåæååã»é åã«å¯¾ãã¦ä¼æããªãã¨ããèå¼±æ§ãçºè¦ããã¾ããã ãã®èå¼±æ§ã¯ãCVE-2018-16396 ã¨ãã¦ç»é²ããã¦ãã¾ãã 詳細 Array#pack ã¡ã½ããã§ã¯ãå¼æ°ã§æå®ããããã©ã¼ãããæååã«å¾ããã¬ã·ã¼ãã§ããé åã®å 容ãæååã«å¤æãããã®ãè¿ãã¾ãã æ¬æ¥ã§ããã°ãé åã®è¦ç´ ã®ä¸ã« taint ãã©ã°ãç«ã£ã¦ãããã®ãå«ã¾ãã¦ããã°ãè¿ãæååã«ããããä¼æã㦠taint ãã©ã°ãç«ã¤ã¹ãã§ãã ã¾ãããã®éãè¡
Before Ruby 2.6, String#split returned array of split strings. In Ruby 2.6, a block can be passed to String#split (Link is not available) which yields each split string and operates on it. This avoids creating an array and thus is memory efficient. We will add method is_fruit? to understand how to use split with a block. 1def is_fruit?(value) 2%w(apple mango banana watermelon grapes guava lychee).
Posted by naruse on 31 May 2018 Ruby 2.6.0ã«åããäºåç®ã®ãã¬ãã¥ã¼ã§ãããRuby 2.6.0-preview2ããªãªã¼ã¹ããã¾ããã Ruby 2.6.0-preview2ã¯ãéè¦ãªæ°æ©è½ã§ããJITãå«ããããä¾å¹´ãããæ©æã«ãªãªã¼ã¹ãããã¨ã«ãã¾ããã ãã®ä¸é¨ã以ä¸ã«ç´¹ä»ãã¾ãã JIT Ruby 2.6ã§ã¯JIT (Just-in-time) ã³ã³ãã¤ã©ãå°å ¥ããã¾ããã JITã³ã³ãã¤ã©ã¯ããããRubyããã°ã©ã ã®å®è¡ãé«éåãããã¨ãç®çã¨ãã¦ãã¾ãã ä»è¨èªã®ä¸è¬çãªJITã³ã³ãã¤ã©ã¨ç°ãªããRubyã®JITã³ã³ãã¤ã©ã¯Cè¨èªã®ã½ã¼ã¹ã³ã¼ãããã¡ã¤ã«ã¨ãã¦ãã£ã¹ã¯ã«æ¸ããé常ã®Cã³ã³ãã¤ã©ãç¨ãã¦ãã¤ãã£ãã³ã¼ãã«å¤æãããã¨ã§JITã³ã³ãã¤ã«ãè¡ãã¨ããææ³ãç¨ãã¦ãã¾ãã(åè: MJIT organization by V
New Class Naming Rules in RubyThere were 26 valid characters. Now there are 1,853! In Ruby 2.5 and prior: Itâs been a longstanding rule in Ruby that you must use a capital ASCII letter as the first character of a Class or Module name. This limited you to just these 26 characters: ABCDEFGHIJKLMNOPQRSTUVWXYZ New in Ruby 2.6: In Ruby 2.6, non-ASCII upper case characters are allowed. By my count, that
The new Ruby 2.6 preview 1 has JIT capability built in. Awesome! But it's still early. They say JIT doesn't help on Rails apps, for instance. Purely by coincidence, I happen to write a big concurrent Rails-based benchmark, which Takashi was hoping to see JIT results for. And I'm freshly back to part-time work after paternity leave. So how is its performance for Rails apps? Let's find out. (Disclai
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}