This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mercury:search-test robb$ ruby ./test.rb | |
user system total real | |
Binary search: 0.000000 0.000000 0.000000 ( 0.000016) | |
Iterative search: 0.000000 0.000000 0.000000 ( 0.004715) | |
Binary search: 0.000000 0.000000 0.000000 ( 0.000010) | |
Iterative search: 0.010000 0.000000 0.010000 ( 0.006112) | |
Binary search: 0.000000 0.000000 0.000000 ( 0.000016) | |
Iterative search: 0.010000 0.000000 0.010000 ( 0.010991) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
THING = "thing_one" | |
puts THING | |
if defined? THING | |
puts "defined? THING is truthy" | |
else | |
puts "defined? THING is falsey" | |
end |