[前][次][番号順一覧][スレッド一覧]

ruby-changes:60009

From: aycabta <ko1@a...>
Date: Wed, 12 Feb 2020 13:15:05 +0900 (JST)
Subject: [ruby-changes:60009] 16f5d63bad (master): [ruby/irb] Use 0.step instead of (..0).each for Ruby 2.5

https://git.ruby-lang.org/ruby.git/commit/?id=16f5d63bad

From 16f5d63bad783ac202a0533249f06deab436aded Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Mon, 3 Feb 2020 01:18:50 +0900
Subject: [ruby/irb] Use 0.step instead of (..0).each for Ruby 2.5

https://github.com/ruby/irb/commit/5d628ca40e

diff --git a/lib/irb/easter-egg.rb b/lib/irb/easter-egg.rb
index 10468bc..64869d8 100644
--- a/lib/irb/easter-egg.rb
+++ b/lib/irb/easter-egg.rb
@@ -116,7 +116,7 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/easter-egg.rb#L116
           end
           ruby_model = RubyModel.new
           print "\e[?1049h"
-          (0..).each do |i|
+          0.step do |i| # TODO (0..).each needs Ruby 2.6 or later
             buff = canvas.draw do
               ruby_model.render_frame(i) do |p1, p2|
                 canvas.line(p1, p2)
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]