Issue #17684 has been updated by tenderlovemaking (Aaron Patterson).


I like using `--disable-gems` for scripts that need to be fast. For example, I call `ruby` from Vim to get some information about the Ruby environment:

```
" Add stdlib of environment's ruby to path
let g:stdlib = system('ruby --disable-gems -rrbconfig -e"print RbConfig::CONFIG[\"rubylibdir\"]"')
let &path .= "," . stdlib
let g:ruby_path = &path
```

Adding 60ms (or more) for these "fast commands" would be pretty annoying.

```
[aaron@tc-lan-adapter ~]$ time ruby --disable-gems -rrbconfig -e"print RbConfig::CONFIG[\"rubylibdir\"]"
/Users/aaron/.rubies/ruby-trunk/lib/ruby/3.1.0
________________________________________________________
Executed in   20.60 millis    fish           external 
   usr time   12.12 millis  146.00 micros   11.98 millis 
   sys time    6.33 millis  741.00 micros    5.59 millis 

[aaron@tc-lan-adapter ~]$ time ruby -rrbconfig -e"print RbConfig::CONFIG[\"rubylibdir\"]"
/Users/aaron/.rubies/ruby-trunk/lib/ruby/3.1.0
________________________________________________________
Executed in   79.02 millis    fish           external 
   usr time   61.54 millis  115.00 micros   61.43 millis 
   sys time   14.46 millis  679.00 micros   13.78 millis 

```


----------------------------------------
Feature #17684: Remove `--disable-gems` from release version of Ruby
https://bugs.ruby-lang.org/issues/17684#change-90931

* Author: hsbt (Hiroshi SHIBATA)
* Status: Open
* Priority: Normal
----------------------------------------
In my understand, `--disable-gems` is only debugging feature for ruby-core team.

But some users enabled its option in test environment for performance or etc. So, `--disable-gems` option is wrong usage for some users.

* https://github.com/rubygems/bundler/issues/7487#issuecomment-569901549
* https://github.com/rubygems/rubygems/pull/4440#issue-587031184

We should remove it from package version of ruby.





-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>