Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Use delete instead. Save on an instantiation of Regexp.

  • Loading branch information...
commit 92c3eb42c6758b2627108d95567cefeea59311dc 1 parent f6d2d09
Ricky Elrod CodeBlock authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  lib/on_irc/server.rb
2  lib/on_irc/server.rb
@@ -15,7 +15,7 @@ def send_cmd(cmd, *args)
15 15 args.compact!
16 16 # prepend last arg with : only if it exists. it's really ugly
17 17 args[-1] = ":#{args[-1]}" if args[-1]
18   - args = args.join(' ').gsub(/[\r\n]/, '')
  18 + args = args.join(' ').delete("\r\n")
19 19 connection.send_data("#{cmd.to_s.upcase} #{args}\r\n")
20 20 end
21 21

0 comments on commit 92c3eb4

Please sign in to comment.
Something went wrong with that request. Please try again.