From: dblack@... Date: 2006-03-29T12:30:54+09:00 Subject: Re: Can anyone see the obvious msitake I've made? Hi -- On Wed, 29 Mar 2006, Kev Jackson wrote: > Can anyone explain why #{args[0].to_sym} is not actually evaluating to the > :id symbol, but eval(args[0].to_sym) does? Especially as the error produced > from watir is exactly the same as if I'd have typed: > > $ie.text_field(:id, 'a_field_that_doesn't_exist') I'm not sure about that part, but I think the problem probably stems from the fact that "#{'sym'.to_sym}" is a string. Anything inside the #{...} construct gets to_s called on it, which trumps the internal to_sym call. David -- David A. Black (dblack@wobblini.net) Ruby Power and Light, LLC (http://www.rubypowerandlight.com) "Ruby for Rails" chapters now available from Manning Early Access Program! http://www.manning.com/books/black