lib/ezmlm/list.rb
changeset 26 a89d91d4b157
parent 25 81cc7d47f68f
child 28 99fdbf4a5f37
--- a/lib/ezmlm/list.rb	Tue May 30 11:08:48 2017 -0700
+++ b/lib/ezmlm/list.rb	Fri Jun 23 10:54:26 2017 -0700
@@ -70,7 +70,7 @@
 	### Returns +true+ if +address+ is a subscriber to this list.
 	###
 	def include?( addr, section: nil )
-		addr.downcase!
+		addr = addr.downcase
 		file = self.subscription_dir( section ) + Ezmlm::Hash.subscriber( addr )
 		return false unless file.exist?
 		return file.read.scan( /T([^\0]+)\0/ ).flatten.include?( addr )
@@ -91,7 +91,7 @@
 	def subscribe( *addr, section: nil )
 		addr.each do |address|
 			next unless address.index( '@' )
-			address.downcase!
+			address = address.downcase
 
 			file = self.subscription_dir( section ) + Ezmlm::Hash.subscriber( address )
 			self.with_safety do
@@ -117,7 +117,7 @@
 	###
 	def unsubscribe( *addr, section: nil )
 		addr.each do |address|
-			address.downcase!
+			address = address.downcase
 
 			file = self.subscription_dir( section ) + Ezmlm::Hash.subscriber( address )
 			self.with_safety do