mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Find irb command path in test
This commit is contained in:
parent
7cc298a484
commit
62cecea073
1 changed files with 8 additions and 1 deletions
|
@ -85,9 +85,16 @@ module TestIRB
|
|||
pend if RUBY_ENGINE == 'truffleruby'
|
||||
bug17623 = '[ruby-core:102468]'
|
||||
bundle_exec = ENV.key?('BUNDLE_GEMFILE') ? ['-rbundler/setup'] : []
|
||||
if File.exist?('./exe/irb')
|
||||
irb_path = './exe/irb'
|
||||
elsif File.exist?('./libexec/irb')
|
||||
irb_path = './libexec/irb'
|
||||
else
|
||||
omit 'irb command not found'
|
||||
end
|
||||
assert_in_out_err(bundle_exec + ['-W0', '-e', <<~RUBY , '--', '-f', '--'], 'binding.local_variables', /\[:_\]/, [], bug17623)
|
||||
version = 'xyz' # typical rubygems loading file
|
||||
load('./exe/irb')
|
||||
load('#{irb_path}')
|
||||
RUBY
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue