[ruby/irb] require_relative can't be used for default gems' exe files

The `exe` folder and `lib` folder of default gems don't locate under the
same place. While `exe/irb` will be under the gem folder, `irb.rb` will be
under `lib/ruby/VERSION/`.

So `require_relative` will make `irb` unuseable when shipped with Ruby.

Related discussion in the comments: https://github.com/ruby/irb/pull/335

https://github.com/ruby/irb/commit/99d3aa979d
This commit is contained in:
st0012 2022-01-17 15:17:18 +00:00 committed by git
parent eb98275c96
commit 3fb1f411ed
1 changed files with 1 additions and 1 deletions

View File

@ -6,6 +6,6 @@
# by Keiju ISHITSUKA(keiju@ruby-lang.org) # by Keiju ISHITSUKA(keiju@ruby-lang.org)
# #
require_relative '../lib/irb' require "irb"
IRB.start(__FILE__) IRB.start(__FILE__)