public void ProcNew3() {
TestOutput(@"
$x = 0
class P < Proc
def initialize *args, &b
p args, b.class, self.class, block_given?
$x += 1
retry if $x < 2
123
end
end
def arg
puts 'arg'
[]
end
def foo
P.new(*arg) { puts 2 }
end
foo { puts 1 }
", @"
arg
[]
Proc
P
true
arg
[]
Proc
P
true
");
}