diff options
| author | Marc-Andre Lafortune <github@marc-andre.ca> | 2021-03-18 09:44:42 -0400 |
|---|---|---|
| committer | aycabta <aycabta@gmail.com> | 2021-09-10 06:37:06 +0900 |
| commit | 3503c94af501e38164613ef8347174a27346828a (patch) | |
| tree | 33858da830276928921ea52e78bb1679413f32bd /lib/irb | |
| parent | 192147afd875a177b45086d904bd910a3dc8ff7e (diff) | |
[ruby/irb] Avoid loading files' local variables [Bug #17623]
https://github.com/ruby/irb/commit/b12f0cb8e2
Diffstat (limited to 'lib/irb')
| -rw-r--r-- | lib/irb/workspace.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/irb/workspace.rb b/lib/irb/workspace.rb index 78d434d106..8157e21644 100644 --- a/lib/irb/workspace.rb +++ b/lib/irb/workspace.rb @@ -57,6 +57,8 @@ EOF __FILE__, __LINE__ - 3) when 4 # binding is a copy of TOPLEVEL_BINDING (default) + # Note that this will typically be IRB::TOPLEVEL_BINDING (see exe/irb) + # This is to avoid RubyGems' local variables (see issue #17623) @binding = TOPLEVEL_BINDING.dup end end |
