Browse files

cleanup Module#compile_context, fix growing over time

  • Loading branch information...
1 parent a194f08 commit 6c9ec4d71de4bd6c61fa9659df08fecfc7315c37 @vito committed May 7, 2012
Showing with 5 additions and 10 deletions.
  1. +5 −10 lib/atomy/module.rb
View
15 lib/atomy/module.rb
@@ -17,17 +17,12 @@ def initialize(file = :local)
const_set(:Self, self)
end
- dynamic_method(:__binding__) do |g|
- g.push_self
- g.add_scope
-
- g.push_self
- g.send :binding, 0, true
- g.ret
- end
-
def compile_context
- @compile_context ||= __binding__
+ @compile_context ||=
+ Binding.setup(
+ Rubinius::VariableScope.current,
+ Rubinius::CompiledMethod.current,
+ Rubinius::StaticScope.new(self, Rubinius::StaticScope.new(Object)))
end
def compile(gen, node)

0 comments on commit 6c9ec4d

Please sign in to comment.