From: Hal Fulton Date: 2004-10-27T19:13:02+09:00 Subject: Re: OpenStruct and #send Robert Klemme wrote: > "Hal Fulton" schrieb im Newsbeitrag > news:417F6F00.6000307@hypermetrics.com... > >>Robert Klemme wrote: >> >> >>>This looks like an IRB anomaly: >> >>Not purely an irb anomaly, as it happens in a script >>without irb. > > > This is interesting. I could not reproduce it. Under which circumstances > does it surface? Try this script: require 'ostruct' def foo puts "I'm a method" end x = OpenStruct.new x.bar = 5 x.foo = 6 puts x.send("bar") puts x.send("foo") Rather than printing 5 and 6, for me it prints: 5 I'm a method nil Does it behave differently for you? Hal