From: Tigger Date: 2001-03-29T10:10:04+09:00 Subject: [ruby-talk:13300] Ruby does not take space in array reference I just started learning Ruby, and noticed an interseting thing in the Solaris version 1.6.3 that I'm using: I start up irb, and type: irb(main):005:0> a = [ 1, 2, 3] [1, 2, 3] Now I reference the array: irb(main):007:0> a[0] 1 So far so good. But now, if I insert a space between the name of the array and the opening bracket, I get an error: irb(main):008:0> a [0] NameError: undefined method `a' for # (irb):8:in `irb_binding' Is this the intended behavior? I like putting in lost of white space into code that I write, and would like to reference teh array as a [0] rather than a [1]. Am I missing something more fundamental about Ruby semantics, or can Ruby be extended to take spaces in such references?