"Hal Fulton" <hal9000 / hypermetrics.com> schrieb im Newsbeitrag news:417F74A9.7080705 / hypermetrics.com... > Robert Klemme wrote: > > "Hal Fulton" <hal9000 / hypermetrics.com> 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? No. And now I see the difference: I was so fixated on checking the instance method that I didn't notice the different behavior of #foo and #send(:foo). Darn! Thx for your patience! Kind regard robert