rbs
rbs copied to clipboard
Move stdlib/rubygems/ to core/rubygems/
I propose to move RubyGems library's RBS from stdlib to core.
In Ruby, rubygems is loaded by default unless --disable-gems is given.
--disable-gems option is provided only for debugging Ruby core. So we can suppose rubygems is loaded always.
But currently RBS provides rubygems as a standard library, so the user needs to load rubygems explicitly in RBS. It is different from Ruby.
So I think RBS should provide rubygems as a core library.
Cons
- Performance
- Loading RBSs will be slower by this change to parse/load
rubygems.rbs. - I guess the parsing cost is small so we can ignore it.
- Loading RBSs will be slower by this change to parse/load
- Compatibility
- If
rubygemslibrary is used in existing code, it will causes a load error (or something) by this change. - For example,
library 'rubygems'inSteepfilewill raise an error ifrubygemslibrary is gone.
- If
Sounds good! 👍