From: Joel VanderWerf Date: 2001-12-16T16:33:07+09:00 Subject: [ruby-talk:28664] Re: forced to predeclare functions? Jack Dempsey wrote: > > Hi everyone, > > just wondering: do i need to declare my functions at the top of files if > i want to define them at the bottom? No, but keep in mind that executable code can mix with definitions: class A def foo Object.new.bar # works--bar is not called when script is being loaded end Object.new.bar # fails--bar is called during load end Object.new.bar # fails myFunction # fails class Object def bar end end def myFunction end -- Joel VanderWerf California PATH, UC Berkeley mailto:vjoel@path.berkeley.edu Ph. (510) 231-9446 http://www.path.berkeley.edu FAX (510) 231-9512