From: dagbrown@... (Dave Brown) Date: 2003-11-28T13:27:08+09:00 Subject: Re: Controlled block variables In article <200311271651.09448.transami@runbox.com>, T. Onoma wrote: : But I wonder, couldn't the only exception be made for Proc? So without the : perens a Proc is a Proc, with perens it's evaluated. : : foo.aproc is a Proc object, : foo.aproc() is the result of calling the Proc : : This kind of distinction is already made with locals vs. methods. Just b/c : Procs face the problem doesn't mean it has to be extend to all. Or am I : missing something further? Yeah, you're thinking in Python, not Ruby. Consider this: class MyClass attr_accessor :name def greet puts "Hi, #{name}!" end end foo=MyClass.new foo.name="Dave" foo.greet Nice and straightforward, right? "name" is an attribute in MyClass, and you can get it and get it as you need. Well, look at what attr_accessor actually does. Let's expand it out: class MyClass def name @name end def name=(new_name) @name=new_name end def greet puts "Hi, #{name}!" end end foo=MyClass.new foo.name="Dave" foo.greet If your suggestion were to be taken, then accessors would stop working the way everyone's used to them working. Lots and lots of code would break. --Dave