Browse files

Use delete instead. Save on an instantiation of Regexp.

  • Loading branch information...
1 parent f6d2d09 commit 92c3eb42c6758b2627108d95567cefeea59311dc @relrod relrod committed Mar 9, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/on_irc/server.rb
View
2 lib/on_irc/server.rb
@@ -15,7 +15,7 @@ def send_cmd(cmd, *args)
args.compact!
# prepend last arg with : only if it exists. it's really ugly
args[-1] = ":#{args[-1]}" if args[-1]
- args = args.join(' ').gsub(/[\r\n]/, '')
+ args = args.join(' ').delete("\r\n")
connection.send_data("#{cmd.to_s.upcase} #{args}\r\n")
end

0 comments on commit 92c3eb4

Please sign in to comment.