From: ahoward Date: 2002-11-20T08:11:04+09:00 Subject: Re: Symbol usage help On Wed, 20 Nov 2002 dblack@candle.superlink.net wrote: D> Actually this: D> D> Class === obj.type D> D> is always true, because it's testing to see whether obj.type is a D> Class. D> D> Maybe you could do: D> D> if Class === const_get(s) D> obj = s.new D> end it seems to be a valid test for me? irb(main):002:0> Class === (eval s).type NameError: (eval):1:in `irb_binding': undefined local variable or method `foobar' for # from (irb):2 from (irb):2 irb(main):003:0> s = 'String' "String" irb(main):004:0> Class === (eval s).type true note the original had a typo (s.intern). don't know what i was thinking, but that doesn't really affect what you were saying does it? -a -- ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ahoward@fsl.noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 ====================================