Robert Walker wrote:

> Why not just let xchg_source deal with the nil then you just have:
> 
> def initialize(source=nil)
>   xchg_source(source)
> end
> 
> protected # assuming this is not part of the public interface

Ah, but it is public and if I pass a nil object to it then it fails, but 
it does not fail if I pass it nothing at all, or if I pass it a string, 
or a file object, etc.  Odd, but there it is.

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to