Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'guard-clause' into confident

Conflicts:
	lib/cowsay.rb
  • Loading branch information...
commit f5a78d8cadf91c67c2ccd906f4ed738ac081b801 2 parents 37503fe + add4ed3
@avdi authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/cowsay.rb
View
2  lib/cowsay.rb
@@ -20,6 +20,7 @@ def initialize(options={})
end
def say(message, options={})
+ return "" if message.nil?
options[:cowfile] and assert(options[:cowfile].to_s !~ /^\s*$/)
command = "cowsay"
if options[:strings] && options[:strings][:eyes]
@@ -31,7 +32,6 @@ def say(message, options={})
destination = WithPath.new(options[:out]).path
messages = Array(message)
- results = []
results = messages.map { |message|
checked_popen(command, "w+", lambda{message}) do |process|
process.write(message)
Please sign in to comment.
Something went wrong with that request. Please try again.