> kernel.rb:
> -------------
> module Kernel
>
> def su u, g = nil
        ^^
> if block_given? then
> pid = fork {
> su u, g
          ^^
It looks like a recursion to me. You do not get infinite
recursion just because you do not supply a block in line 6.

Can you tell what is your Kernel#su supposed to do?

Alfred