From: Jason Mayer Date: 2006-12-27T22:53:25+09:00 Subject: Re: newbie with a weird technical problem (@ least I think it's weird) ------=_Part_83044_30368870.1167227603019 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 12/27/06, Jason Mayer wrote: > > On 12/27/06, will wrote: > > > > Yep, as the post title implies, I'm a newbie. Being a pragmatic newbie > > I'd rather be learning to program, than searching for answers to > > non-language acquisition questions/problems. I'm pretty sure the > > following falls in that latter group, so if it's in a manual somewhere > > please tell me so _politely_ and point me to _the_ manual. :-) > > > > I'm starting to go through Dave Thomas' Programming Ruby/Picaxe (I'm on > > pgs 25-26 2nd edition if you care) and I'm using TextMate/Terminal to > > code and run modified versions of the book's examples. So I ran a > > version of the following with a typographical error, which was apparent > > with the Terminal feedback. So far, so good. I fixed the error and > > tried to run it again. The problem is that now when I run it, all I > > get in response is a new blank prompt. I've tried renaming the file, > > the class, giving it a completely new set of variables in the array and > > quiting/restarting the Terminal. If I type the _exact_ same thing into > > irb I'm able to create a book and book2 instance and .inspect each of > > them. But with the TextMate/Terminal combo = Nothing, nadda, zip! > > HELP, PLEASE! > > > > > > #filename bib.rb > > > > class Book > > def initialize(title, author, pages) > > @title = title > > @author = author > > @pages = pages > > end > > end > > > > book = Book.new("Ruby Tutorial", "Dave", 831) > > book.inspect > > > > > > #terminal results > > computer: me$ ruby bib.rb > > computer: me$ > > > I plugged that into SciTe and added this line to the end. > puts.book.inspect > I hit f5 and got this: > >ruby mailinglist.rb > # > >Exit code: 0 > Err. puts book.inspect as others pointed out :P ------=_Part_83044_30368870.1167227603019--