Name lookup in ruby can somethimes act really strangly