Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix code generation for op_asgn_1 calls (foo[bar] += 10)
- Loading branch information
1 parent
bafc36a
commit a62a443
Showing
3 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
require 'spec_helper' | ||
|
||
describe "Operator calls" do | ||
before { @obj = {:value => 10} } | ||
|
||
it "compiles as a normal send method call" do | ||
@obj[:value] += 15 | ||
@obj[:value].should == 25 | ||
|
||
@obj[:value] -= 23 | ||
@obj[:value].should == 2 | ||
end | ||
end |