lib/hirb/util.rb in hirb-0.7.2 vs lib/hirb/util.rb in hirb-0.7.3

- old
+ new

@@ -11,11 +11,11 @@ name.split('::').each {|e| klass = klass.const_get(e) } klass rescue - nil + nil end end # Recursively merge hash1 with hash2. def recursive_hash_merge(hash1, hash2) @@ -51,10 +51,10 @@ result end # Determines if a shell command exists by searching for it in ENV['PATH']. def command_exists?(command) - ENV['PATH'].split(File::PATH_SEPARATOR).any? {|d| File.exists? File.join(d, command) } + ENV['PATH'].split(File::PATH_SEPARATOR).any? {|d| File.exist? File.join(d, command) } end # Returns [width, height] of terminal when detected, nil if not detected. # Think of this as a simpler version of Highline's Highline::SystemExtensions.terminal_size() def detect_terminal_size