diff options
Diffstat (limited to 'test/irb/test_workspace.rb')
-rw-r--r-- | test/irb/test_workspace.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/irb/test_workspace.rb b/test/irb/test_workspace.rb index a39bea2050..61653486a1 100644 --- a/test/irb/test_workspace.rb +++ b/test/irb/test_workspace.rb @@ -80,6 +80,16 @@ module TestIRB assert_equal(nil, workspace.code_around_binding) end + + def test_toplevel_binding_local_variables + bug17623 = '[ruby-core:102468]' + bundle_exec = ENV.key?('BUNDLE_GEMFILE') ? ['-rbundler/setup'] : [] + status = assert_in_out_err(bundle_exec + ['-W0', '-e', <<~RUBY , '--', '-f', '--'], 'binding.local_variables', /\[:_\]/, [], bug17623) + version = 'xyz' # typical rubygems loading file + load('./exe/irb') + RUBY + end + private def with_script_lines |