From: Matthias Winkelmann Date: 2008-07-10T19:55:30+09:00 Subject: Overloading the []-Operator Hi, I'm trying to overload the [ ] operator. It works fine for read-only access: def [](acc) @myValues[acc] end However, I'd also need write access. I've tried: def [](acc)=(value) @myValues[acc] = value end And get a syntax error on the first line. I'd appreciate any help. Matt -- Posted via http://www.ruby-forum.com/.