From: ts Date: 2002-03-28T22:33:39+09:00 Subject: Re: .send for global vars? >>>>> "M" == Morris, Chris writes: M> irb(main):017:0> class Test M> irb(main):018:1> attr_accessor :a M> irb(main):019:1> end When you write this, you have defined 2 methods Test#a and Test#a= This is _like_ if you have written (in reality ruby has optimization for this case) class Test def a @a end def a=(b) @a = b end end M> irb(main):023:0> t.send("a") Here you try to call the method #a for the `t' object M> irb(main):008:0> send("$_" + x) M> NameError: undefined method `$_foobar' for # M> from (irb):8:in `send' M> from (irb):8 Well you try to call the method $_foobar which is not defined Guy Decoux