Skip to content
Permalink
Browse files

Merge pull request #805 from jstepien/fix-bang-method-call

Add a production for "expr : BANG command_call"
  • Loading branch information
alex committed Jul 13, 2013
2 parents f8507a3 + 90a2b1c commit 5bf38e801742290242ecafe69c89e20834bca9e2
Showing with 7 additions and 1 deletion.
  1. +6 −0 tests/test_interpreter.py
  2. +1 −1 topaz/parser.py
@@ -1912,3 +1912,9 @@ def test_rescue_superclass(self, space):
end
""")
assert space.int_w(w_res) == 0

def test_bang_method_call_without_parens(self, space):
w_res = space.execute("""
! respond_to? :asdf
""")
assert w_res is space.w_true
@@ -701,7 +701,7 @@ def expr_not(self, p):

@pg.production("expr : BANG command_call")
def expr_bang_command_call(self, p):
raise NotImplementedError(p)
return self.new_call(p[1], self.new_token(p[0], "!", "!"), None)

@pg.production("expr : arg")
def expr_arg(self, p):

0 comments on commit 5bf38e8

Please sign in to comment.
You can’t perform that action at this time.