Ruby ã®éçºçã«å³ä»£å ¥æ¼ç®åã¨å®é¨çã«ã¨ã³ãã¬ã¹ã¡ã½ããå®ç¾©æ§æãæ°ãã追å ããã¾ããã å³ä»£å ¥æ¼ç®å ãã±ããï¼https://bugs.ruby-lang.org/issues/15921 pull requestï¼https://github.com/ruby/ruby/pull/3012 左辺å¤ãå³è¾ºã®å¤æ°ã«ä»£å ¥ãã => æ¼ç®åãæ°ãã追å ããã¾ããã ãã㯠expression => variable ã®ããã«æ¸ããã¨ãã§ãã¾ãã # 左辺å¤ãå³è¾ºã®å¤æ°ã«ä»£å ¥ãã 42 => result p result # => 42 # ã¡ã½ãããã§ã¼ã³ã®æå¾ã«ä»£å ¥æ¼ç®åãæ¸ããã¨ãã§ãã (1..).lazy.select { _1 % 2 == 0 }.map { _1 * 2 } => x p x.first(10) # => [4, 8, 12, 16, 20, 24, 2
{{#tags}}- {{label}}
{{/tags}}