I tried running the script test.rb, containing:
puts "Debugging" if $DEBUG
using the command:
> ruby test开发者_StackOverflow社区.rb --debug
The --debug switch seems to have no effect. What gives?
Duh... debug parameter needs to be passed to Ruby.
> ruby --debug test.rb
works as expected.
精彩评论