On Fri, 06 Jan 2006 14:40:36 -0000, Dave Howell <groups / grandfenwick.net>  
wrote:

> P. S. With duck-typing as a Virtue in Rubyville, when am I ever going to  
> be presented with a method that won't accept a String as well as a  
> Symbol? Would there ever be a reason besides "bad programming" to be  
> that restrictive?
>

Here's one:

	f = File.read(:"/etc/passwd")

	TypeError: can't convert Symbol into String
       	  from (irb):1:in `read'
	        from (irb):1

I guess it doesn't always 'make sense', and that it's just about not  
bothering to coerce arguments to strings when that's the case.

-- 
Ross Bamford - rosco / roscopeco.remove.co.uk