ruby-changes:48835
From: nobu <ko1@a...>
Date: Fri, 1 Dec 2017 12:54:54 +0900 (JST)
Subject: [ruby-changes:48835] nobu:r60952 (trunk): prelude.rb: suppress redefinition warnings
nobu 2017-12-01 12:54:49 +0900 (Fri, 01 Dec 2017) New Revision: 60952 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60952 Log: prelude.rb: suppress redefinition warnings Modified files: trunk/lib/irb.rb trunk/prelude.rb Index: lib/irb.rb =================================================================== --- lib/irb.rb (revision 60951) +++ lib/irb.rb (revision 60952) @@ -703,7 +703,6 @@ end https://github.com/ruby/ruby/blob/trunk/lib/irb.rb#L703 class Binding # :nodoc: - undef irb if method_defined?(:irb) def irb IRB.setup(eval("__FILE__")) workspace = IRB::WorkSpace.new(self) Index: prelude.rb =================================================================== --- prelude.rb (revision 60951) +++ prelude.rb (revision 60952) @@ -140,6 +140,9 @@ class Binding https://github.com/ruby/ruby/blob/trunk/prelude.rb#L140 require 'irb' irb end + + # suppress redefinition warning + alias irb irb # :nodoc: end module Kernel @@ -150,4 +153,7 @@ module Kernel https://github.com/ruby/ruby/blob/trunk/prelude.rb#L153 require 'pp' pp(*objs) end + + # suppress redefinition warning + alias pp pp # :nodoc: end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/