From: kingruedi@... (=?utf-8?q?R=C3=BCdiger_Sonderfeld?=) Date: 2005-09-04T00:16:26+09:00 Subject: Lexical Casts with Ruby Hello, I want to assign some values I recive in string form to attributes of a user specified class. The problem is that I have to lexical cast the strings into the required type. I can't use to_i or to_f because the attribute type can only be determined at runtime. Is there a way for lexical casts between types in Ruby? Something like convert("10", Fixnum) => 10 Regards, RĂ¼diger Sonderfeld