From: Frederick Cheung Date: 2008-07-16T17:23:00+09:00 Subject: Re: check my class On 16 Jul 2008, at 05:35, misterparker@gmail.com wrote: > >> It sure looks to me like you can just cut and paste it into >> irb. ;) It >> took me literally ten seconds (I had to wait for my terminal to load >> because my memory is topped) to check this. >> >> You'll find that Ruby is very forgiving of this kind of >> experimentation. >> If you can do it, it will let you do it. If you can't, it will >> tell you >> you can't without trashing your system. > > > I'm on a mac, and I used textedit to write the class, then copied and > pasted but after ever def and many other lines after that it asked me > Display all 319 possibilities? (y or n) > so thats why i was curious if i should be able to or not...would you > know why it does that? Because your file probably used tabs (the convention usually to use soft tabs instead, 2 spaces per tab). In an interactive session with irb tab means auto complete so pasting a document with tabs in it won't end well. Don't know if you can set textedit to use spaces instead of tabs. Fred > > > > > as for the help on the class thank you! i am coming from php and i > started looking into ruby yesterday...so i'm still unsure of what is > the same or different or what is allowed....But thank you. > >