summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2013-02-17 17:51:03 +0100
committerKornelius Kalnbach <murphy@rubychan.de>2013-02-17 17:51:03 +0100
commit7f664a608f902a2e1623b9e066386599c741e202 (patch)
treec44f95b1ddaaff0d518d84769d0e5f7cbbe391a1
parentdb02224471bb7d56266c86aa8628ec901cabf2a8 (diff)
downloadcoderay-7f664a608f902a2e1623b9e066386599c741e202.tar.gz
cleanup: value_expected should be boolean
-rw-r--r--lib/coderay/scanners/ruby.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/coderay/scanners/ruby.rb b/lib/coderay/scanners/ruby.rb
index b26c387..8cd89f0 100644
--- a/lib/coderay/scanners/ruby.rb
+++ b/lib/coderay/scanners/ruby.rb
@@ -128,9 +128,9 @@ module Scanners
value_expected = check(/#{patterns::VALUE_FOLLOWS}/o)
# OPERATORS #
- elsif !method_call_expected && match = scan(/ (\.(?!\.)|::) | (?: \.\.\.? | ==?=? | [,\(\[\{] )() | [\)\]\}] /x)
+ elsif !method_call_expected && match = scan(/ (\.(?!\.)|::) | ( \.\.\.? | ==?=? | [,\(\[\{] ) | [\)\]\}] /x)
method_call_expected = self[1]
- value_expected = !method_call_expected && self[2]
+ value_expected = !method_call_expected && !!self[2]
if inline_block_stack
case match
when '{'