p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   RoR Ruby on Rails (http://p2p.wrox.com/ror-ruby-rails-411/)
-   -   Problem with 'chomp' (http://p2p.wrox.com/ror-ruby-rails/80777-problem-chomp.html)

barryjogorman September 1st, 2010 05:27 PM

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)


All times are GMT -4. The time now is 12:40 PM.

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