Skip to content
Permalink
Browse files

Merge pull request #847 from kachick/fix-instance_eval

Guard BasicObject#instance_eval from segfault
  • Loading branch information
kachick committed Oct 17, 2015
2 parents e29bc04 + 9e98d7a commit 8913846f72b3014287238fe05540989db48249b2
Showing with 4 additions and 1 deletion.
  1. +4 −1 topaz/objects/objectobject.py
@@ -96,7 +96,10 @@ def method_instance_eval(self, space, string=None, filename=None, w_lineno=None,
lineno = 1
return space.execute(string, self, StaticScope(space.getclass(self), None), filename, lineno)
else:
return space.invoke_block(block.copy(space, w_self=self), [])
if block is not None:
return space.invoke_block(block.copy(space, w_self=self), [])
else:
raise space.error(space.w_ArgumentError, "block not supplied")

@classdef.method("singleton_method_removed")
def method_singleton_method_removed(self, space, w_name):

0 comments on commit 8913846

Please sign in to comment.