From caeafbe8252d13624a16acac703e4d04fcb19062 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Sat, 24 Aug 2019 17:16:11 -0700 Subject: [PATCH] Move private call without arguments inside method This code did not have the desired effect. I'm not sure if irb_binding is supposed to be private or not. If not, the private call can just be removed. --- lib/irb/workspace.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/irb/workspace.rb b/lib/irb/workspace.rb index 2bbd5cf9ec..595e654f07 100644 --- a/lib/irb/workspace.rb +++ b/lib/irb/workspace.rb @@ -49,7 +49,7 @@ EOF @binding = BINDING_QUEUE.pop when 3 # binding in function on TOPLEVEL_BINDING(default) - @binding = eval("self.class.send(:remove_method, :irb_binding) if defined?(irb_binding); def irb_binding; private; binding; end; irb_binding", + @binding = eval("self.class.send(:remove_method, :irb_binding) if defined?(irb_binding); private; def irb_binding; binding; end; irb_binding", TOPLEVEL_BINDING, __FILE__, __LINE__ - 3)