From: Tim Hunter Date: 2008-11-08T04:15:43+09:00 Subject: Re: Another require question Ed Hardy wrote: (snip) > For instance, this line fails: > > puts math.sqrt(234) > > it outputs this error: > > "undefined local variable or method `math' for main:Object (NameError)" > > this line fails: > > f= file.open('c:\cher.bat') # similar error message as above (snip) In Ruby, case matters. It's Math.sqrt, not math.sqrt, and File.open, not file.open. In Ruby, variables that start with an uppercase character are constants, and the names of modules (like Math) and classes (like File) are constants. Variables that start with a lowercase character are just plain variables. -- Posted via http://www.ruby-forum.com/.