% ruby -rdebug test-rdb
Debug.rb
Emacs support available.
test-rdb:4:class WordDictionary
(rdb:1) n
test-rdb:29:dictionary = WordDictionary.new
(rdb:1) n
test-rdb:30:p dictionary.findWord("shovel")
(rdb:1) s
test-rdb:19: return if wordFragment.empty?
(rdb:1) n
test-rdb:20: puts "dictionary size is #{@dict.size}"
(rdb:1) n
dictionary size is 235880
test-rdb:21: results = []
(rdb:1) n
test-rdb:22: @sortedDictKeys.each do |key|
(rdb:1) trace on
Trace on.
(rdb:1) c
#0:test-rdb:22:Array:>: @sortedDictKeys.each do |key|
#0:test-rdb:23:WordDictionary:-: results << key if key =~ /#{wordFragment}/
#0:test-rdb:23:WordDictionary:-: results << key if key =~ /#{wordFragment}/
#0:test-rdb:23:WordDictionary:-: results << key if key =~ /#{wordFragment}/
#0:test-rdb:23:WordDictionary:-: results << key if key =~ /#{wordFragment}/
#0:test-rdb:23:WordDictionary:-: results << key if key =~ /#{wordFragment}/
<ctrl-c>
(rdb:1) trace off
Trace off.
(rdb:1)