Skip to content

Commit

Permalink
All ObjectSpace#each_object specs pass now
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Gaynor committed Apr 7, 2013
1 parent e0a9877 commit 4e91251
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions spec/tags/core/objectspace/each_object_tags.txt

This file was deleted.

3 changes: 3 additions & 0 deletions topaz/modules/objectspace.py
Expand Up @@ -23,6 +23,8 @@ class ObjectSpace(Module):

@moduledef.function("each_object")
def method_each_object(self, space, w_mod, block):
if block is None:
return space.send(self, space.newsymbol("enum_for"), [space.newsymbol("each_object"), w_mod], block)
match_w = []
roots = [gcref for gcref in rgc.get_rpy_roots() if gcref]
pending = roots[:]
Expand All @@ -37,3 +39,4 @@ def method_each_object(self, space, w_mod, block):
clear_gcflag_extra(roots)
for w_obj in match_w:
space.invoke_block(block, [w_obj])
return space.newint(len(match_w))

0 comments on commit 4e91251

Please sign in to comment.