vm/instructions.rb
# [Operation]
#   Add a new StaticScope entry for the given Module
# [Format]
#   \add_scope
# [Stack Before]
#   * #<Module>
#   * ...
# [Stack After]
#   * ...
# [Description]
#   Create a new StaticScope object for the given Module on the stack.
#   This scope is chained off the current scope of the method.
#
#   This also sets the scope of the current CompiledMethod to the new
#   StaticScope
#
[Operation]
Add a new StaticScope entry for the given Module
[Format]
\add_scope
[Stack Before]
#

[Stack After]

[Description]
Create a new StaticScope object for the given Module on the stack.
This scope is chained off the current scope of the method.

This also sets the scope of the current CompiledMethod to the new
StaticScope
[ Operation ] Add a new StaticScope entry for the given Module [ Format ] \ add_scope [ Stack Before ] # [ Stack After ] [ Description ] Create a new StaticScope object for the given Module on the stack . This scope is chained off the current scope of the method . This also sets the scope of the current CompiledMethod to the new StaticScope
def add_scope
    <<-CODE
    Object* obj = stack_pop();
    Module* mod = as<Module>(obj);
    StaticScope* scope = StaticScope::create(state);
    scope->module(state, mod);
    scope->parent(state, call_frame->static_scope);
    call_frame->cm->scope(state, scope);
    call_frame->static_scope = scope;
    CODE
  end
def add_scope <<-CODE 
    Object* obj = stack_pop();
    Module* mod = as<Module>(obj);
    StaticScope* scope = StaticScope::create(state);
    scope->module(state, mod);
    scope->parent(state, call_frame->static_scope);
    call_frame->cm->scope(state, scope);
    call_frame->static_scope = scope;
     CODE end
[Operation]
Add a new StaticScope entry for the given Module
[Format]
\add_scope
[Stack Before]
 #<Module>
 ...
[Stack After]
 ...
[Description]
Create a new StaticScope object for the given Module on the stack.
[ Operation ] Add a new StaticScope entry for the given Module [ Format ] \ add_scope [ Stack Before ] #<Module > ... [ Stack After ] ... [ Description ] Create a new StaticScope object for the given Module on the stack .