Skip to content

Commit

Permalink
Whoops violated shaky assumption between 1.8/1.9 behavior in dnodes
Browse files Browse the repository at this point in the history
  • Loading branch information
enebo committed Oct 21, 2011
1 parent e19e8f0 commit 854daad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/org/jruby/parser/ParserSupport.java
Expand Up @@ -1625,7 +1625,7 @@ public Node newRegexpNode(ISourcePosition position, Node contents, RegexpNode en
if (fragment instanceof StrNode) { if (fragment instanceof StrNode) {
ByteList frag = ((StrNode) fragment).getValue(); ByteList frag = ((StrNode) fragment).getValue();
regexpFragmentCheck(end, frag); regexpFragmentCheck(end, frag);
encoding = frag.getEncoding(); if (!lexer.isOneEight()) encoding = frag.getEncoding();
} }
} }


Expand All @@ -1635,7 +1635,7 @@ public Node newRegexpNode(ISourcePosition position, Node contents, RegexpNode en
// EvStrNode: #{val}: no fragment check, but at least set encoding // EvStrNode: #{val}: no fragment check, but at least set encoding
ByteList empty = ByteList.create(""); ByteList empty = ByteList.create("");
regexpFragmentCheck(end, empty); regexpFragmentCheck(end, empty);
encoding = empty.getEncoding(); if (!lexer.isOneEight()) encoding = empty.getEncoding();
return new DRegexpNode(position, options, encoding).add(contents); return new DRegexpNode(position, options, encoding).add(contents);
} }


Expand Down

0 comments on commit 854daad

Please sign in to comment.