Project

General

Profile

Actions

Bug #3205

closed

Problem with recent update to lib/net/smtp.rb rcptto_list method

Bug #3205: Problem with recent update to lib/net/smtp.rb rcptto_list method

Added by artconnoisseur (Daniel Mavis) over 15 years ago. Updated over 14 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2dev (2010-04-19 trunk 27394)
Backport:
[ruby-core:29809]

Description

=begin
Looks like recent update to lib/net/smtp.rb rcptto_list method uses unknown/undeclared variable name 'ok_addrs' instead of 'ok_users' which causes an exception when trying to send mail on line 842. See snippet below:

def rcptto_list(to_addrs)
raise ArgumentError, 'mail destination not given' if to_addrs.empty?
ok_users = []
unknown_users = []
to_addrs.flatten.each do |addr|
begin
rcptto addr
rescue SMTPAuthenticationError
unknown_users << addr.dump
else
ok_users << addr
end
end
raise ArgumentError, 'mail destination not given' if ok_addrs.empty? #<= undeclared variable name 'ok_addrs', appears that it should be 'ok_users'
ret = yield
unless unknown_users.empty?
raise SMTPAuthenticationError, "failed to deliver for #{unknown_users.join(', ')}"
end
ret
end
=end

Updated by nobu (Nobuyoshi Nakada) over 15 years ago Actions #1

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r27512.
Daniel, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: PDF Atom