Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b67e232d94b2
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9fd77277bd43
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Apr 17, 2015

  1. Use indirected fmode.

    headius committed Apr 17, 2015
    Copy the full SHA
    92ad0af View commit details
  2. MRI does not redispatch here.

    headius committed Apr 17, 2015
    Copy the full SHA
    9fd7727 View commit details
Showing with 2 additions and 2 deletions.
  1. +1 −1 core/src/main/java/org/jruby/RubyFile.java
  2. +1 −1 core/src/main/java/org/jruby/RubyIO.java
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyFile.java
Original file line number Diff line number Diff line change
@@ -1261,7 +1261,7 @@ public IRubyObject fileOpenGeneric(ThreadContext context, IRubyObject filename,

fptr.setFD(sysopen(context.runtime, fptr.getPath(), oflags, perm));
fptr.checkTTY();
if ((fmode & OpenFile.SETENC_BY_BOM) != 0) {
if ((fmode_p[0] & OpenFile.SETENC_BY_BOM) != 0) {
EncodingUtils.ioSetEncodingByBOM(context, this);
}

2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyIO.java
Original file line number Diff line number Diff line change
@@ -3709,7 +3709,7 @@ private static IRubyObject[] processReadlinesMethodArguments(IRubyObject[] args)

private static RubyArray readlinesCommon19(ThreadContext context, RubyIO file, IRubyObject[] newArguments) {
try {
return (RubyArray) file.callMethod(context, "readlines", newArguments);
return file.readlines(context, newArguments);
} finally {
file.close();
}