1 assert_equal %q{[1, 2, 3]}, %q{
23 assert_equal %q{7}, %q{
36 cl.call + cl.call * cl.call
38 assert_equal %q{ok}, %q{
46 C.method(:new).to_proc
51 assert_equal %q{[0, 1, :last, 0, 2, :last]}, %q{
67 pr[0].call(:last).concat pr[1].call(:last)
69 assert_equal %q{12}, %q{
86 assert_equal %q{200}, %q{
117 (pr1.call + pr2.call) * loc1
119 assert_equal %q{[1, 2]}, %q{
139 x = ['a', 1,2,3,4,5,6,7,8,9,0,
140 1,2,3,4,5,6,7,8,9,0,
141 1,2,3,4,5,6,7,8,9,0,
142 1,2,3,4,5,6,7,8,9,0,
143 1,2,3,4,5,6,7,8,9,0,]
146 assert_equal %q{1}, %q{
170 assert_equal %q{[:C, :C]}, %q{
182 assert_equal %q{top}, %q{
194 assert_equal %q{1}, %q{
199 m{|e_proctest| e_proctest}.call(1)
201 assert_equal %q{12}, %q{
206 m{|e_proctest1, e_proctest2|
207 a = e_proctest1 * e_proctest2 * 2
211 assert_equal %q{[[], [1], [1, 2], [1, 2, 3]]}, %q{
213 Proc.new{|*args| args}.call(),
214 Proc.new{|*args| args}.call(1),
215 Proc.new{|*args| args}.call(1, 2),
216 Proc.new{|*args| args}.call(1, 2, 3),
219 assert_equal %q{[[nil, []], [1, []], [1, [2]], [1, [2, 3]]]}, %q{
221 Proc.new{|a, *b| [a, b]}.call(),
222 Proc.new{|a, *b| [a, b]}.call(1),
223 Proc.new{|a, *b| [a, b]}.call(1, 2),
224 Proc.new{|a, *b| [a, b]}.call(1, 2, 3),
227 assert_equal %q{0}, %q{
234 assert_equal %q{[1, 0]}, %q{
240 assert_equal %q{1}, %q{
246 assert_equal %q{3}, %q{
256 assert_equal %Q{ok\n}, %q{
257 class A; def get_block; proc {puts "ok"} end end
258 block = A.new.get_block
261 }, '[ruby-core:14885]'
263 assert_equal 'ok', %q{
264 a = lambda {|x, y, &b| b }
266 if b.call(2){} == nil
271 }, '[ruby-core:15551]'
273 assert_equal 'ok', %q{
278 }, '[ruby-dev:34646]'
280 assert_equal %q{[:bar, :foo]}, %q{
283 define_method(:bar) do
287 [klass.new.bar, :foo]
290 }, "[ ruby-Bugs-19304 ]"
292 assert_equal 'ok', %q{
299 def7(lambda {|x| x.call}, Proc.new {return})
304 }, '[ruby-core:17164]'
306 assert_equal 'ok', %q{
307 lambda { a = lambda { return }; $x = :ng; a[]; $x = :ok }.call
309 }, '[ruby-core:17164]'
311 assert_equal 'ok', %q{
312 lambda { a = lambda { break }; $x = :ng; a[]; $x = :ok }.call
314 }, '[ruby-core:17164]'
316 assert_equal 'ok', %q{
319 lambda { a = Proc.new { return }; a[]}.call
324 }, '[ruby-core:17164]'
327 assert_equal 'ok', %q{
329 lambda {|a| $x = :ok; a[]; $x = :ng }.call(Proc.new { return })
334 }, '[ruby-core:17164]'
336 assert_equal 'ok', %q{
339 lambda { 1.times { return } }.call
345 }, '[ruby-core:17164]'
347 assert_equal 'ok', %q{
352 lambda { def11 { return } }.call
353 rescue LocalJumpError
358 }, '[ruby-core:17164]'
360 assert_equal 'ok', %q{
362 b = Proc.new { $x = :ng; lambda { return }.call; $x = :ok }.call
366 }, '[ruby-core:17164]'
368 assert_equal 'ok', %q{
381 assert_equal 'ok', %q{
395 f.call_it(&give_it())
396 }, '[ruby-core:15711]'