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

Commits on Aug 31, 2016

  1. Copy the full SHA
    0c4f987 View commit details
  2. Copy the full SHA
    82942a6 View commit details
Showing with 15 additions and 2 deletions.
  1. +1 −1 core/src/main/java/org/jruby/specialized/RubyArrayTwoObject.java
  2. +13 −0 spec/regression/GH-4124_packed_array_replace_spec.rb
  3. +1 −1 truffle/pom.xml
Original file line number Diff line number Diff line change
@@ -252,7 +252,7 @@ public IRubyObject replace(IRubyObject orig) {

if (origArr.size() == 2) {
car = origArr.eltInternal(0);
cdr = origArr.eltInternal(0);
cdr = origArr.eltInternal(1);
return this;
}

13 changes: 13 additions & 0 deletions spec/regression/GH-4124_packed_array_replace_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
describe '#4124 Packed arrays' do
it 'replaces properly' do
# try a range of sizes, since we may expand packed arrays
arys = 1.upto(10).map {|i| (1..i).to_a }

arys.each do |ary|
plus_one = ary.map {|i| i+1}
ary.replace plus_one

ary.should == plus_one
end
end
end
2 changes: 1 addition & 1 deletion truffle/pom.xml
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ DO NOT MODIFIY - GENERATED CODE
<parent>
<groupId>org.jruby</groupId>
<artifactId>jruby-parent</artifactId>
<version>9.1.3.0-SNAPSHOT</version>
<version>9.1.4.0-SNAPSHOT</version>
</parent>
<artifactId>jruby-truffle</artifactId>
<name>JRuby Truffle</name>