ruby-changes:55546
From: naruse <ko1@a...>
Date: Sat, 27 Apr 2019 09:17:51 +0900 (JST)
Subject: [ruby-changes:55546] naruse:c8b675adb9 (trunk): suppress redefinition warnings
https://git.ruby-lang.org/ruby.git/commit/?id=c8b675adb9 From c8b675adb902a67bf62a1a9945bade7c8becc4e8 Mon Sep 17 00:00:00 2001 From: naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Sun, 21 Apr 2019 05:48:35 +0000 Subject: suppress redefinition warnings git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e diff --git a/lib/irb/workspace.rb b/lib/irb/workspace.rb index bee59b9..28a0bbe 100644 --- a/lib/irb/workspace.rb +++ b/lib/irb/workspace.rb @@ -49,7 +49,7 @@ EOF https://github.com/ruby/ruby/blob/trunk/lib/irb/workspace.rb#L49 @binding = BINDING_QUEUE.pop when 3 # binding in function on TOPLEVEL_BINDING(default) - @binding = eval("def irb_binding; private; binding; end; irb_binding", + @binding = eval("self.class.remove_method(:irb_binding) if defined?(irb_binding); def irb_binding; private; binding; end; irb_binding", TOPLEVEL_BINDING, __FILE__, __LINE__ - 3) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/