Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Open Source > RoR Ruby on Rails
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the RoR Ruby on Rails section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old September 1st, 2010, 05:27 PM
Registered User
 
Join Date: Jun 2010
Location: Dublin, Ireland
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to barryjogorman
Default Problem with 'chomp'

Very simple program:

while($_ != "q")
puts "Running..."
print "Enter q to quit: "
gets
chomp
end

However - getting the following in any progams in which I use 'chomp': 'undefined local variable or method 'chomp' for main: Object (NameError)
__________________
Barry J O'Gorman
Dublin
Ireland
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chomp ZORCH Perl 1 May 14th, 2007 05:54 AM
ruby on rails>>chomp ckonrad BOOK: Beginning Ruby on Rails 4 March 28th, 2007 02:24 AM



All times are GMT -4. The time now is 12:34 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.