Skip to content

Commit

Permalink
Fix #5128. eval in Rack::Builder prints "warning: `frozen_string_lite…
Browse files Browse the repository at this point in the history
…ral' is ignored after any tokens".

Silliest of the silly inverted logic.
enebo committed Apr 19, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent fc80c00 commit 07e2088
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/lexer/yacc/RubyLexer.java
Original file line number Diff line number Diff line change
@@ -874,7 +874,7 @@ private int yylex() throws IOException {
continue;
case '#': { /* it's a comment */
this.tokenSeen = tokenSeen;
if (!tokenSeen || !warnings.isVerbose()) {
if (!tokenSeen || warnings.isVerbose()) {
if (!parser_magic_comment(lexb.makeShared(lex_p, lex_pend - lex_p))) {
if (comment_at_top()) set_file_encoding(lex_p, lex_pend);
}

1 comment on commit 07e2088

@perlun
Copy link
Contributor

@perlun perlun commented on 07e2088 Apr 19, 2018

Choose a reason for hiding this comment

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

Good fix, thanks!

Please sign in to comment.