From: Hans Fugal Date: 2002-11-08T06:09:17+09:00 Subject: v.polar = rho, theta Hi, I'm using the Vector class and needed a way to set the vector with polar coordinates. My solution: class Vector def set_polar(rho,theta) @elements[0] = rho * Math.cos(theta) @elements[1] = rho * Math.sin(theta) end end But it struck me that defining polar=(rho,theta) would be more ruby-like, and I expected to call it like so: v.polar = 1, 3.14 That doesn't work, though. This does, but it's ugly: irb(main):020:0> v = Vector[0,0] Vector[0, 0] irb(main):021:0> v.send(:polar=,1,3.14) 0.001592652916 irb(main):022:0> v.inspect "Vector[-0.9999987317, 0.001592652916]" Is there another way, or what should I do?