Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

/=/ Syntax bug #14

Merged
merged 1 commit into from

2 participants

@tlewin

Fix a little bug, where expression like "a=b=c".split(/=/) breaks the text parser, because the /= is interpreted as operator assignment and the rest as regular expression.

@JEG2 JEG2 merged commit a960c1b into from
@JEG2

Your regex didn't work like you think it did. In English, your expression meant "the beginning of a line, followed by a parenthesis, followed by /=" so it broke matching the real operator.

I fixed it with a followup commit using a look-behind, just in case you are curios.

Thanks for the fix.

@tlewin

Thanks for explanation!

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 17, 2011
  1. @tlewin
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  Syntaxes/Ruby.plist
View
2  Syntaxes/Ruby.plist
@@ -553,7 +553,7 @@
<key>comment</key>
<string>Needs higher precidence than regular expressions.</string>
<key>match</key>
- <string>/=</string>
+ <string>^\(/=</string>
<key>name</key>
<string>keyword.operator.assignment.augmented.ruby</string>
</dict>
Something went wrong with that request. Please try again.