Sha256: a1b2a9f49828b4d31df929113e1bb0cd9f437c5ac5cccdb58049df465d727b09
Contents?: true
Size: 598 Bytes
Versions: 14
Compression:
Stored size: 598 Bytes
Contents
#!/usr/bin/env ruby # This program is used to test that 'restart' works when we didn't call # the debugger initially. TOP_SRC_DIR = File.join(File.expand_path(File.dirname(__FILE__), "..")) unless defined?(TOP_SRC_DIR) $:.unshift File.join(TOP_SRC_DIR, "ext") $:.unshift File.join(TOP_SRC_DIR, "lib") $:.unshift File.join(TOP_SRC_DIR, "cli") require 'ruby-debug' Debugger.start # GCD. We assume positive numbers def gcd(a, b) # Make: a <= b debugger if a > b a, b = [b, a] end return nil if a <= 0 if a == 1 or b-a == 0 return a end return gcd(b-a, a) end gcd(3,5)
Version data entries
14 entries across 14 versions & 4 rubygems