--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Adds a Ruby Gem to the $LOAD_PATH. Before a Gem is loaded, its required Gems are loaded. If the version information is omitted, the highest version Gem of the supplied name is loaded. If a Gem is not found that meets the version requirement and/or a required Gem is not found, a Gem::LoadError is raised. More information on version requirements can be found in the Gem::Version documentation.
- !ruby/struct:SM::Flow::P 
  body: The <tt>gem</tt> directive should be executed <b>before</b> any require statements (otherwise rubygems might select a conflicting library version).
- !ruby/struct:SM::Flow::P 
  body: "You can define the environment variable GEM_SKIP as a way to not load specified gems. You might do this to test out changes that haven't been installed yet. Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  GEM_SKIP=libA:libB ruby-I../libA -I../libB ./mycode.rb\n"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "gem:"
    body: "[String or Gem::Dependency] The gem name or dependency instance."
  - !ruby/struct:SM::Flow::LI 
    label: "version_requirement:"
    body: "[default=&quot;&gt;= 0&quot;] The version requirement."
  - !ruby/struct:SM::Flow::LI 
    label: "return:"
    body: "[Boolean] true if the Gem is loaded, otherwise false."
  - !ruby/struct:SM::Flow::LI 
    label: "raises:"
    body: "[Gem::LoadError] if Gem cannot be found, is listed in GEM_SKIP, or version requirement not met."
  type: :NOTE
full_name: Kernel#gem
is_singleton: false
name: gem
params: (gem_name, *version_requirements)
visibility: public
