summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-23 08:40:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-23 08:40:36 +0000
commit39f09ca13f5f1d421fb69656e91f896371cf101b (patch)
tree6a12c72c3322dbff2fa66b1df8685a8ae8ab0d3f /parse.y
parent14f7df242f75c32472ee1f0dc1eec142c26b2547 (diff)
* parse.y (warn_balanced): no warning for singleton class.
[ruby-core:30366] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index e69318be08..63fac21284 100644
--- a/parse.y
+++ b/parse.y
@@ -6484,7 +6484,8 @@ 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) \
- (last_state != EXPR_DOT && last_state != EXPR_FNAME && last_state != EXPR_ENDFN && \
+ (last_state != EXPR_CLASS && last_state != EXPR_DOT && \
+ last_state != EXPR_FNAME && last_state != EXPR_ENDFN && \
space_seen && !ISSPACE(c) && \
(ambiguous_operator(op, syn), 0))