Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a production for "expr : BANG command_call" #805

Merged
merged 1 commit into from Jul 13, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/test_interpreter.py
Expand Up @@ -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
2 changes: 1 addition & 1 deletion topaz/parser.py
Expand Up @@ -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):
Expand Down