# Code Review: CC2

**URL:** <https://www.ruby-forum.com/t/code-review-cc2/139799>\
**Category:** IronRuby\
**Created:** [June 7, 2008, 5:31am UTC](https://www.ruby-forum.com/t/code-review-cc2/139799 "2008-06-07T05:31:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![grujildo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/94ad74/32.png) [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Post date:** [June 7, 2008, 5:31am UTC](https://www.ruby-forum.com/t/code-review-cc2/139799/1 "2008-06-07T05:31:04Z")

</div>

tfpt review “/shelveset:CC2;REDMOND\tomat”

Replaces most uses of Ast.CodeContext() calls by references to the  
current RubyScope variable.  
Removes uses of LambdaBuilder and scope factories.  
Introduces LocalsBuilder - a simple List wrapper.

Moves a scope variable stored on FrameScope up to the VariableScope  
(renamed from SelfScope). The VariableScope represents a scope of local  
variables - it could either be a method scope, block scope, or module  
scope.

Merges RubyOps.Create_Scope and RubyOps.Initialize_Scope. This is now  
possible due to Ast.AllLocalVariables node. Factories are now explicitly  
called by IronRuby and not passed to DLR scopes.

Also fixes bug in module scopes - local variables were not allocated on  
a correct scope.

Tomas
