ruby-changes:71024
From: manga_osyo <ko1@a...>
Date: Thu, 27 Jan 2022 01:29:01 +0900 (JST)
Subject: [ruby-changes:71024] b6b2e489f1 (master): [ruby/irb] Changed to call Kernel.print
https://git.ruby-lang.org/ruby.git/commit/?id=b6b2e489f1 From b6b2e489f10bfc771beae8fa0ee5237613acd18f Mon Sep 17 00:00:00 2001 From: manga_osyo <manga.osyo@g...> Date: Mon, 6 Dec 2021 08:57:56 +0900 Subject: [ruby/irb] Changed to call Kernel.print If you call `binding.irb` on a class defined `#print`, it will crash, so call `Kernel.print`. Fix [Bug #18389] `binding.irb` can fail in some classes that implement `context` and `print` methods. https://github.com/ruby/irb/commit/d54b271984 --- lib/irb/extend-command.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/irb/extend-command.rb b/lib/irb/extend-command.rb index d6fb19038d7..7778a0d0ce8 100644 --- a/lib/irb/extend-command.rb +++ b/lib/irb/extend-command.rb @@ -235,7 +235,7 @@ module IRB # :nodoc: https://github.com/ruby/ruby/blob/trunk/lib/irb/extend-command.rb#L235 alias_method to, from } else - print "irb: warn: can't alias #{to} from #{from}.\n" + Kernel.print "irb: warn: can't alias #{to} from #{from}.\n" end end -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/