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: 9a87aff668c3
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: daee894db023
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Mar 13, 2015

  1. Copy the full SHA
    5f73ea9 View commit details
  2. Copy the full SHA
    daee894 View commit details
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/ruby/truffle/shims/stringio.rb
  2. +1 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/StringNodes.java
4 changes: 2 additions & 2 deletions lib/ruby/truffle/shims/stringio.rb
Original file line number Diff line number Diff line change
@@ -10,8 +10,8 @@

class StringIO

def initialize(string, mode)
@lines = string.split(/\n/).reject { |line| line.empty? }
def initialize(string=nil, mode=nil)
@lines = (string || '').split(/\n/).reject { |line| line.empty? }
end

def gets
Original file line number Diff line number Diff line change
@@ -980,7 +980,7 @@ private Object substr(RubyString string, int beg, int len) {

if (beg < 0) {
beg += length;
if (beg < 0) getContext().getCoreLibrary().getNilObject();
if (beg < 0) return getContext().getCoreLibrary().getNilObject();
}

int end = Math.min(length, beg + len);