summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-29 04:50:16 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-29 04:50:16 +0000
commit54bd3c23fb8d218b3c551da89d040bf9544eae9a (patch)
tree248411caaf5d5e8468b7ca18b1f54d0b237f2b53 /lib
parent1e6eed0cf5a45a787e01630b10d1f3f87e7a01d3 (diff)
merge revision(s) 43954: [Backport #9125]
* lib/net/smtp.rb (Net::SMTP#critical): Always return a Net::SMTP::Response. Patch by Pawel Veselov. [ruby-trunk - Bug #9125] * test/net/smtp/test_smtp.rb: Test for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@44741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/net/smtp.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/net/smtp.rb b/lib/net/smtp.rb
index f6e2ea9d9c..ca6b70669b 100644
--- a/lib/net/smtp.rb
+++ b/lib/net/smtp.rb
@@ -934,11 +934,11 @@ module Net
end
def critical(&block)
- return '200 dummy reply code' if @error_occured
+ return Response.parse('200 dummy reply code') if @error_occurred
begin
return yield()
rescue Exception
- @error_occured = true
+ @error_occurred = true
raise
end
end