Skip to Content

Ruby Core API vs Standard Library

Posted on

Ruby Doc come with 2 sections: Core and Standard. Both of them are installed when we install Ruby.

Ruby API Core

  • Is loaded by default by default.
  • Core functionality is everything you don’t have to require to use

Standard Library

  • Has additional libraries/methods
  • Need to use require "lib_name" to use
  • Many libs we used are standard libraries: base64, csv, time, …

=> So, why Core and Std Libraries are sprerated? why not combie StdLib with Core API?

The reason why we don’t combie is keeping the memory footprint down by not automatically loading rarely used files. Cause there are many libs which we rarly used.

References:

comments powered by Disqus