On Apr 30, 2007, at 7:26 AM, Jim Correia wrote:
On Apr 30, 2007, at 7:42 AM, Greg wrote:
If I use Menu #! > Run on a Ruby script, I get an error:
<fileName>:11: private method `chomp' called for nil:NilClass
(NoMethodError)
If I use Menu #! > Run in Terminal, the script runs.
Is this a bug or am I doing something wrong?
Do you have a reduced example script which demonstrates the problem?
Jim
Jim
Thanks for asking. From Pine, pg. 27, Learn to Program. This isn't
the same script, so the error occurs on a different line. (I lost
track of the original. It's been more than a week due to an error in
my part in resigning up for the discussion group.) Runs fine when
called from Terminal, i.e., Ruby /path/to/script.
Greg
=========
#!/usr/bin/env ruby
puts 'Hello there, and what\'s your name?'
name = gets.chomp
puts 'Your name is ' + name + '? What a lovely name!'
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>