From 3fb1f411ed8dcae693c2e9bdb68f4e9815cbb5f1 Mon Sep 17 00:00:00 2001 From: st0012 Date: Mon, 17 Jan 2022 15:17:18 +0000 Subject: [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 --- libexec/irb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libexec') diff --git a/libexec/irb b/libexec/irb index ffc97867d0..c64ee85fbd 100755 --- a/libexec/irb +++ b/libexec/irb @@ -6,6 +6,6 @@ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # -require_relative '../lib/irb' +require "irb" IRB.start(__FILE__) -- cgit v1.2.1