Author: David Schneider <david.schnei...@picle.org> Branch: Changeset: r49:59c883c71c04 Date: 2011-09-27 16:06 +0200 http://bitbucket.org/pypy/lang-io/changeset/59c883c71c04/
Log: pass first test for forwding a message without arguments diff --git a/io/model.py b/io/model.py --- a/io/model.py +++ b/io/model.py @@ -239,8 +239,14 @@ w_result = self.cached_result else: w_method = w_receiver.lookup(self.name) - assert w_method is not None, 'Method "%s" not found in "%s"' % (self.name, str(w_receiver)) - w_result = w_method.apply(space, w_receiver, self, w_context) + if w_method is not None: + w_result = w_method.apply(space, w_receiver, self, w_context) + else: + w_forward = w_receiver.lookup('forward') + if w_forward: + w_result = w_forward.apply(space, w_receiver, self, w_context) + else: + raise AssertionError('Method "%s" not found in "%s"' % (self.name, str(w_receiver))) if not space.is_normal_status(): print 'Returning non default value' return space.w_return_value _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit