From 5761093ee1f7a30b2fbbbe0aaff507b96c13d9fd Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 1 Dec 2017 03:54:49 +0000 Subject: [PATCH] prelude.rb: suppress redefinition warnings git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/irb.rb | 1 - prelude.rb | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/irb.rb b/lib/irb.rb index dcc160f140..b07bc80c95 100644 --- a/lib/irb.rb +++ b/lib/irb.rb @@ -703,7 +703,6 @@ end class Binding # :nodoc: - undef irb if method_defined?(:irb) def irb IRB.setup(eval("__FILE__")) workspace = IRB::WorkSpace.new(self) diff --git a/prelude.rb b/prelude.rb index c0a8dfccfa..a693f46156 100644 --- a/prelude.rb +++ b/prelude.rb @@ -140,6 +140,9 @@ class Binding require 'irb' irb end + + # suppress redefinition warning + alias irb irb # :nodoc: end module Kernel @@ -150,4 +153,7 @@ module Kernel require 'pp' pp(*objs) end + + # suppress redefinition warning + alias pp pp # :nodoc: end