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

Commits on Dec 15, 2015

  1. [Truffle] New passing spec.

    eregon committed Dec 15, 2015
    Copy the full SHA
    08189f7 View commit details
  2. Copy the full SHA
    f26f906 View commit details
Showing with 10 additions and 1 deletion.
  1. +10 −0 spec/ruby/language/lambda_spec.rb
  2. +0 −1 spec/truffle/tags/language/return_tags.txt
10 changes: 10 additions & 0 deletions spec/ruby/language/lambda_spec.rb
Original file line number Diff line number Diff line change
@@ -22,6 +22,16 @@ def create_lambda
-> () { }.lambda?.should be_true
end

it "has its own scope for local variables" do
l = -> arg {
var = arg
# this would override var if it was declared outside the lambda
l.call(arg-1) if arg > 0
var
}
l.call(1).should == 1
end

context "assigns no local variables" do
evaluate <<-ruby do
@a = -> { }
1 change: 0 additions & 1 deletion spec/truffle/tags/language/return_tags.txt

This file was deleted.