PageRenderTime 16ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/test/pending/closed_upval.rb

http://github.com/feyeleanor/RubyGoLightly
Ruby | 11 lines | 7 code | 2 blank | 2 comment | 0 complexity | 20edf63a6d241aac8fdf9cfddd2cc790 MD5 | raw file
 1def add(x)
 2  Proc.new do |y|
 3    x + y
 4  end
 5end
 6
 7puts add(2).call(3)
 8# => 5
 9
10puts add(3).call(5)
11# => 8