create a basic Ruby script called debugtest.rb: : Ruby Commandline « Language Basics « Ruby






create a basic Ruby script called debugtest.rb:


i = 1
j = 0
until i > 1000000
  i *= 2
  j += 1
end
puts "i = #{i}, j = #{j}"

# run as following

# ruby -r debug debugtest.rb

 








Related examples in the same category

1.type a command to check the version of Ruby (this works on Unix/Linux and Windows):
2.Running the Ruby Interpreter