From: Brian Candler Date: 2010-02-22T21:40:23+09:00 Subject: Re: Difference between length and length() Nike Mike wrote: > Is there any difference between length and length().Pls explain In general, foo.length and foo.length() are the same thing. They are calling a method 'length' on object 'foo' with no arguments. However, a bareword 'length' with no receiver could be a local variable. Try the following in irb: def length return 123 end length = 456 length # this is 456, not a call to method 'length' length() # this calls the method 'length' self.length # so does this -- Posted via http://www.ruby-forum.com/.