rewrite sizeof using ruby