From: mike.cahill@... Date: 2007-05-23T12:05:31+09:00 Subject: string -> symbol, redux --NextPart_Webmail_9m3u9jl4l_26398_1179889520_0 Content-Type: text/plain Content-Transfer-Encoding: 8bit ok... i'm still not getting it. i want the elegant way to do the last two lines in my Server initialize. and please be kind - i'm just a programming hack, not a professional. =) --------------------------------- module Toc44_all def toc44_all_system(cmd) the_pipe=IO.popen(cmd) res = the_pipe.read the_pipe.close return res end def toc44_all_twoargs(a,b) return "#{a} - #{b}" end end module Toc44_fw def toc44_fw_justme(arg) return "returning #{arg}" end end class Server def initialize my_type = "fw" extend eval("Toc44_all") extend eval("Toc44_#{my_type}") eval("def toc44_fw_system(args); return toc44_all_system(args);end") eval("def toc44_fw_twoargs(*args); return toc44_all_twoargs(*args);end") end end svr = Server.new puts svr.toc44_fw_justme("howdy") puts svr.toc44_fw_system("dir") puts svr.toc44_fw_twoargs("hi","there") --NextPart_Webmail_9m3u9jl4l_26398_1179889520_0--