From 5881cb537d8f187bfb0acd72de48240e1e2c89c5 Mon Sep 17 00:00:00 2001 From: David Albert Date: Tue, 26 Jun 2012 18:38:58 -0400 Subject: [PATCH] make top level methods defined in IRB private --- 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 edc0d3b..71bc84d 100644 --- a/lib/irb/workspace.rb +++ b/lib/irb/workspace.rb @@ -48,7 +48,7 @@ EOF @binding = BINDING_QUEUE.pop when 3 # binging in function on TOPLEVEL_BINDING(default) - @binding = eval("def irb_binding; binding; end; irb_binding", + @binding = eval("def irb_binding; private; binding; end; irb_binding", TOPLEVEL_BINDING, __FILE__, __LINE__ - 3) -- 1.7.11.1