Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

15 lines (12 sloc) 0.368 kb
require 'test/unit'
class TestInstanceExec < Test::Unit::TestCase
# JRUBY-3594
def test_instance_exec
o = Object.new
lam = lambda {|a,b,c,d,e| [a,b,c,d,e]}
result = o.instance_exec(1,2,3,4,5, &lam)
assert_equal([1,2,3,4,5], result)
result = o.instance_exec(1,2,3,4,5) {|a,b,c,d,e| [a,b,c,d,e]}
assert_equal([1,2,3,4,5], result)
end
end
Jump to Line
Something went wrong with that request. Please try again.