开发者

How does $DEBUG variable get set when running a Ruby script

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜