Skip to content

Commit

Permalink
require_relative can't be used for default gems' exe files
Browse files Browse the repository at this point in the history
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: #335
  • Loading branch information
st0012 authored and hsbt committed Jan 18, 2022
1 parent 922f0ee commit 99d3aa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exe/irb
Expand Up @@ -6,6 +6,6 @@
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#

require_relative '../lib/irb'
require "irb"

IRB.start(__FILE__)

0 comments on commit 99d3aa9

Please sign in to comment.