Skip to content

Commit 2c6af6d

Browse files
committed
Fixes #2258. Encoding issue with backticks
1 parent 5e0ee3c commit 2c6af6d

File tree

6 files changed

+2372
-2365
lines changed

6 files changed

+2372
-2365
lines changed

core/src/main/java/org/jruby/ast/DXStrNode.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
***** END LICENSE BLOCK *****/
3232
package org.jruby.ast;
3333

34+
import org.jcodings.Encoding;
3435
import org.jruby.Ruby;
3536
import org.jruby.ast.types.ILiteralNode;
3637
import org.jruby.ast.visitor.NodeVisitor;
@@ -48,6 +49,10 @@ public DXStrNode(ISourcePosition position, DStrNode node) {
4849
super(position);
4950
addAll(node);
5051
}
52+
53+
public DXStrNode(ISourcePosition position, Encoding encoding) {
54+
super(position, encoding);
55+
}
5156

5257
public DXStrNode(ISourcePosition position) {
5358
super(position);
@@ -69,6 +74,8 @@ public Object accept(NodeVisitor iVisitor) {
6974

7075
@Override
7176
public IRubyObject interpret(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) {
72-
return self.callMethod(context, "`", super.interpret(runtime, context, self, aBlock));
77+
IRubyObject string = super.interpret(runtime, context, self, aBlock);
78+
79+
return self.callMethod(context, "`", string);
7380
}
7481
}

core/src/main/java/org/jruby/parser/Ruby19.java

Whitespace-only changes.

0 commit comments

Comments
 (0)