Permalink
Browse files

byterun: Fix check for bound methods on falsy objects. (#95)

The test failures in core/glob_test, core/lexer_gen_test and core/lex_test were caused by calling a method on a falsy object and byterun incorrectly treating the `self` parameter as nonexistent.
  • Loading branch information...
Yorwba authored and andychu committed Apr 8, 2018
1 parent ac26ef0 commit bb691293e168c23fbf251a7103298fa006ac6bd6
Showing with 1 addition and 1 deletion.
  1. +1 −1 opy/byterun/pyvm2.py
View
@@ -872,7 +872,7 @@ def call_function(self, arg, args, kwargs):
#debug('im_self %r', (func.im_self,))
#debug('posargs %r', (posargs,))
if func.im_self:
if func.im_self is not None:
posargs.insert(0, func.im_self)
#debug('posargs AFTER %r', (posargs,))

0 comments on commit bb69129

Please sign in to comment.