Project

General

Profile

Actions

Bug #15738

closed

RUBYOPT disables have precedence over the command line

Added by Eregon (Benoit Daloze) about 5 years ago. Updated about 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-linux]
[ruby-core:92052]

Description

From #15736:

It seems unexpected that the command line argument doesn't override the RUBYOPT options:

$ RUBYOPT=--disable-gems ruby --enable=gems -e 'p defined?(Gem)'
nil

That seems a bug. I would expect the command line arguments always override RUBYOPT arguments.

This:

$ ruby --disable=gems --enable=gems -e 'p defined?(Gem)'     
"constant"
$ ruby --enable=gems --disable=gems -e 'p defined?(Gem)'
nil

works as expected.


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #15736: r67361 Update to ruby/spec@e81b3cd - spec failures on MinGW ?ClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0