Skip to content
Permalink
Browse files

fixed a proc spec

  • Loading branch information
Alex Gaynor
Alex Gaynor committed Apr 9, 2013
1 parent 5a16752 commit 7c7fb94a30a9724eb749242db91388c0b5c5f548
Showing with 4 additions and 1 deletion.
  1. +0 −1 spec/tags/core/kernel/proc_tags.txt
  2. +2 −0 topaz/modules/kernel.py
  3. +2 −0 topaz/objects/procobject.py
@@ -1,2 +1 @@
fails:Kernel.proc is a private method
fails:Kernel.proc raises an ArgumentError when no block is given
@@ -44,6 +44,8 @@ def function_lambda(self, space, block):

@moduledef.method("proc")
def function_proc(self, space, block):
if block is None:
raise space.error(space.w_ArgumentError, "tried to create Proc object without a block")
return space.newproc(block, False)

@staticmethod
@@ -15,6 +15,8 @@ def get_block(self):

@classdef.singleton_method("allocate")
def method_allocate(self, space, args_w, block):
if block is None:
raise space.error(space.w_ArgumentError, "tried to create Proc object without a block")
return W_ProcObject(space, block, False)

@classdef.method("[]")

0 comments on commit 7c7fb94

Please sign in to comment.