What does it mean $: in Ruby -
What does it mean $: in Ruby -
i reading next tutorial.
it talked including files in ruby file require :
require(string) => true or false
ruby tries load library named string, returning true if successful. if filename not resolve absolute path, searched in directories listed in $:. if file has extension ".rb", loaded source file; if extension ".so", ".o", or ".dll", or whatever default shared library extension on current platform, ruby loads shared library ruby extension. otherwise, ruby tries adding ".rb", ".so", , on name. name of loaded feature added array in $:.
i want know $: in ruby , $: means.
the variable $: 1 of execution environment variables, array of places search loaded files.
the initial value value of arguments passed via -i command-line option, followed installation-defined standard library location.
see pre-defined variables, $load_path alias.
ruby
Comments
Post a Comment