Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions ir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,15 @@ fi

# -S searches RUBYPATH before PATH; Src/StdLib/bin holds the executables the
# bundled library ships (irb), so `./ir.sh -S irb` runs IronRuby's own rather
# than whatever binstub happens to be on PATH. An existing RUBYPATH still wins
# for anything not shipped here.
RUBYPATH="$S/bin${RUBYPATH:+:$RUBYPATH}"
# than whatever binstub happens to be on PATH. The directory ir itself is in
# is RubyGems' bindir here (RbConfig's bindir), where `igem install` writes the
# binstubs of installed gems; it comes next, so `./ir.sh -S <gem executable>`
# finds the binstub written for IronRuby before a host Ruby's version of the
# same command - or a version manager's shim, which is a native executable and
# not a script at all. An existing RUBYPATH is searched after both - IronRuby's
# own commands come first, as they always have for Src/StdLib/bin - and still
# beats PATH for anything not found here. ir.cmd uses the same order.
RUBYPATH="$S/bin:$(dirname "$IR_BIN")${RUBYPATH:+:$RUBYPATH}"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
export RUBYPATH

exec "$IR_BIN" -X:UsePrism \
Expand Down
Loading