From: Dan Date: 2007-08-21T15:12:18+09:00 Subject: (String * Fixnum) and (Fixnum * String) ------=_Part_18803_17545883.1187676737740 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Just a small quick question: String * Fixnum works: "test " * 4 => test test test test while Fixnum * String doesn't: 4 * "test " TypeError: String can't be coerced into Fixnum from (irb):19:in `*' from (irb):19 I understand that ruby being strongly typed means you can only do "sensible" things with the types you are working with. However, aren't the examples above pretty much equivalent? or is it a precedence thing? Trying to answer my own question is it because the "*" operator for a Fixnum only accepts another Fixnum/Bignum, while the "*" operator for a String only allows a Fixnum, because it sure doesn't let you do String * String (and why would you really). Someone please help me grasp this :) Thanks ------=_Part_18803_17545883.1187676737740--