Austin Ziegler wrote:
> On Tue, 24 Aug 2004 09:59:15 +0900, Jamis Buck <jgb3 / email.byu.edu> wrote:
> 
>>I blindly assumed that OpenStruct would handle respond_to? properly, but
>>I'm seeing the following behavior:
>>
>>   o = OpenStruct.new( :type_id => "string" )
>>   p o.type_id #-> "string"
>>   p o.respond_to?( :type_id ) #-> false
>>
>>Is this the correct behavior for OpenStruct, or should this be reported
>>as a bug?
> 
> 
> I think that OpenStruct uses #method_missing.

I think you're right. However, that doesn't preclude the possibility of 
OpenStruct also implementing a custom "respond_to?" method... Would this 
be desirable, or would it have other (negative) consequences?

- Jamis

-- 
Jamis Buck
jgb3 / email.byu.edu
http://www.jamisbuck.org/jamis

"I use octal until I get to 8, and then I switch to decimal."