diff --git a/core/src/main/java/org/jruby/RubyFile.java b/core/src/main/java/org/jruby/RubyFile.java index b78f04d5192..d9ef4f2d0bb 100644 --- a/core/src/main/java/org/jruby/RubyFile.java +++ b/core/src/main/java/org/jruby/RubyFile.java @@ -1232,7 +1232,7 @@ protected void sysopenInternal(String path, ModeFlags modes, int perm) { IRubyObject theInternal = internalEncoding == null ? runtime.getNil() : runtime.getEncodingService().getEncoding(internalEncoding); - setEncoding(runtime.getCurrentContext(), theInternal, theBom, null); + setEncoding(runtime.getCurrentContext(), theBom, theInternal, null); } } }