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

Commits on Feb 13, 2015

  1. Copy the full SHA
    37e41a1 View commit details
  2. Copy the full SHA
    8b36955 View commit details
Showing with 5 additions and 5 deletions.
  1. +1 −1 core/src/main/java/org/jruby/ir/IRBuilder.java
  2. +4 −4 spec/regression/GH-2574_dont_clobber_variable.rb
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/ir/IRBuilder.java
Original file line number Diff line number Diff line change
@@ -2086,7 +2086,7 @@ public Operand buildDStr(DStrNode node) {

Variable res = createTemporaryVariable();
addInstr(new BuildCompoundStringInstr(res, pieces, node.getEncoding()));
return copyAndReturnValue(res);
return res;
}

public Operand buildDSymbol(DSymbolNode node) {
8 changes: 4 additions & 4 deletions spec/regression/GH-2574_dont_clobber_variable.rb
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@

it 'right value for hash literals' do
a = 0
b = { a => a, (a = 1) => a } # => { 1 => 1 } (MRI: {0=>0, 1=>1})
c = { a => a, a => (a = 2) } # => { 2 => 2 } (MRI: {1=>2})
b = { a => a, (a = 1) => a }
c = { a => a, a => (a = 2) }
expect(b).to eq({0=>0, 1=>1})
expect(c).to eq({1=>2})
end
@@ -20,7 +20,7 @@
expect(b).to eq([0, 1])
end

it 'right value for reassigned are in a call' do
it 'right value for reassigned arg in a call' do
def foo(*r); r; end
a = 0
expect(foo(a, a=1)).to eq([0,1])
@@ -32,7 +32,7 @@ def foo(*r); r; end
expect(b).to eq(2)
end

it 'right value for reassigned in attrasgn' do
it 'right value for reassigned arg in attrasgn' do
x = [1,2]
x[a=0] = a=3
expect(x).to eq([3,2])