Skip to content

Conversation

@mbj
Copy link
Collaborator

@mbj mbj commented Apr 13, 2013

Fixes the missing ( in %W() style literals.

@mbj
Copy link
Collaborator Author

mbj commented Apr 13, 2013

This commit includes some other stuff, will redo it, sorry for the noise.

@mbj mbj closed this Apr 13, 2013
@coveralls
Copy link

Coverage decreased (-0.13%) when pulling ec1cf83 on mbj:capture-literal-delimiter into 431e9ce on whitequark:master.

View Details

@mbj mbj reopened this Apr 13, 2013
@mbj
Copy link
Collaborator Author

mbj commented Apr 13, 2013

Fixed, should not result in coverage decrease!

@coveralls
Copy link

Coverage decreased (-0.14%) when pulling 947893e on mbj:capture-literal-delimiter into 431e9ce on whitequark:master.

View Details

@coveralls
Copy link

Coverage decreased (-0.13%) when pulling 947893e on mbj:capture-literal-delimiter into 431e9ce on whitequark:master.

View Details

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parser follows the GitHub style guide, which instructs to never use and and or.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, #end_with? is much more clear in this case.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not only it is more clear, it also fixes a bug :)

  1) Failure:
TestLexer#test_regexp_escape_backslash_terminator [/home/whitequark/parser/test/test_lexer.rb:71]:
%r%blah\%blah%.
Expected: [:tREGEXP_BEG, "%r"]
  Actual: [:tREGEXP_BEG, "%r%"]

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I followed dkubb styleguide, no problem for me to use the GH styleguide here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbj I'm not sure I would've used and or or in a boolean statement either :P

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dkubb I remember I nitpicked about this some time :P

whitequark added a commit that referenced this pull request Apr 13, 2013
Capture delimiter in percent encoded literals
@whitequark whitequark merged commit 6af04ea into whitequark:master Apr 13, 2013
@mbj mbj deleted the capture-literal-delimiter branch March 4, 2014 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants