From: "Gray, Jeff" Date: 2002-05-30T08:43:00+09:00 Subject: Parsing of equals sign as part of method name We all know that one can either define a method that has a name of the form 'method=' (or use attr_accessor/attr_writer), and when Ruby sees obj.method = value the equivalent of obj.method=(value) I'm finding that the parser never expects or allows more than one argument to the 'method=' style of method naming. For example, you could define a method interface of: def method=(arg, &block) but the parser doesn't want to let you pass in a block to this call. Both of the following generate parse errors: obj.method = 12 { } obj.method=(12) { } (Simply removing the '=' from the method name allows the second case to work.) I couldn't find anything in the pickaxe book or in ruby-talk archives about this restriction. I'm on Ruby version 1.6.5 -- has this behavior changed in later versions, or is it a permanent trait of Ruby syntax? Thanks, - jeff