If you want to get the class name, try:
u.class.to_s
Edit:
As Sergey pointed out in his answer it is better to use
u.class.name
I believe that is because to_s could be overwritten and it could possibly return a different string that the one returned by name.