From: Sarah Allen Date: 2010-04-14T08:24:06+09:00 Subject: I thought spaces didn't matter around operators I had understood that operators, like minus (-), had special "syntactic sugar" that allowed me to include or omit spaces around them like this: >> 1-1 => 0 >> 1 -1 => 0 >> 1 - 1 => 0 >> 1- 1 => 0 However, in some cases, spaces seem to matter: >> t = Time.now => Tue Apr 13 13:40:24 -0700 2010 >> Time.now -t NoMethodError: undefined method `-@' for Tue Apr 13 13:40:24 -0700 2010:Time from (irb):6 >> Time.now - t => 6.895787 Can someone explain what "undefined method `-@'" refers to? Here's my version of Ruby if it matters: $ ruby -v ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0] Thanks, Sarah http://www.ultrasarus.com -- Posted via http://www.ruby-forum.com/.