Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/net/smtp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,7 @@ def initialize(address, *args, **kw_args)
def to_s
@address
end
alias to_str to_s
end
end # class SMTP

Expand Down
2 changes: 2 additions & 0 deletions test/net/smtp/test_smtp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ def test_rcptto_with_address
def test_address
a = Net::SMTP::Address.new('[email protected]', 'p0=123', {p1: 456}, p2: nil, p3: '789')
assert_equal '[email protected]', a.address
assert_equal '<[email protected]>', "<#{a}>" # Address#to_s
assert_match(/\Afoo@example\.com\z/, a) # Address#to_str
assert_equal ['p0=123', 'p1=456', 'p2', 'p3=789'], a.parameters
end

Expand Down