From 980f994b3b349486c5e64b51241330d4c9fc63f1 Mon Sep 17 00:00:00 2001 From: Marc-Andre Lafortune Date: Fri, 20 Nov 2020 16:58:02 -0500 Subject: [ruby/irb] Change context-mode's default to new mode 4. This new mode uses a copy of the TOPLEVEL_BINDING. This is compatible with refinements (contrary to mode 3), while keeping nested IRB sessions separate https://github.com/ruby/irb/commit/25c731cb2f --- lib/irb/init.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/irb/init.rb') diff --git a/lib/irb/init.rb b/lib/irb/init.rb index 48b669f211..73ef420e60 100644 --- a/lib/irb/init.rb +++ b/lib/irb/init.rb @@ -108,7 +108,7 @@ module IRB # :nodoc: @CONF[:PROMPT_MODE] = (STDIN.tty? ? :DEFAULT : :NULL) @CONF[:AUTO_INDENT] = true - @CONF[:CONTEXT_MODE] = 3 # use binding in function on TOPLEVEL_BINDING + @CONF[:CONTEXT_MODE] = 4 # use a copy of TOPLEVEL_BINDING @CONF[:SINGLE_IRB] = false @CONF[:LC_MESSAGES] = Locale.new -- cgit v1.2.3