summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-09 06:57:42 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-09 06:57:42 +0000
commitf030a91d3e5317f62ca6ff8c273061e46248dd08 (patch)
tree5c4c2b49a3a615dd1e469ed3469d4e3327d22a9c /parse.y
parentab714c82f0f9b8c27275f9dde3b56ff171ef37dc (diff)
downloadbundler-f030a91d3e5317f62ca6ff8c273061e46248dd08.tar.gz
* parse.y (warn_balanced): use bit-wise operation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 1 insertions, 3 deletions
diff --git a/parse.y b/parse.y
index e043e99e2e..a025a51db7 100644
--- a/parse.y
+++ b/parse.y
@@ -6739,9 +6739,7 @@ parser_prepare(struct parser_params *parser)
#define ambiguous_operator(op, syn) dispatch2(operator_ambiguous, ripper_intern(op), rb_str_new_cstr(syn))
#endif
#define warn_balanced(op, syn) ((void) \
- (last_state != EXPR_CLASS && last_state != EXPR_DOT && \
- last_state != EXPR_FNAME && last_state != EXPR_ENDFN && \
- last_state != EXPR_ENDARG && \
+ (!(last_state & (EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN|EXPR_ENDARG)) && \
space_seen && !ISSPACE(c) && \
(ambiguous_operator(op, syn), 0)))