We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bac5fd7 commit 4816f10Copy full SHA for 4816f10
lib/net/imap.rb
@@ -2443,8 +2443,8 @@ def put_string(str)
2443
if @debug_output_bol
2444
$stderr.print("C: ")
2445
end
2446
- $stderr.print(str.gsub(/\n(?!\z)/n, "\nC: "))
2447
- if /\r\n\z/n.match(str)
+ $stderr.print(str.gsub(/\n/n) { $'.empty? ? $& : "\nC: " })
+ if /\n\z/n.match(str)
2448
@debug_output_bol = true
2449
else
2450
@debug_output_bol = false
test/net/imap/test_regexps.rb
@@ -27,9 +27,6 @@ class IMAPRegexpsTest < Test::Unit::TestCase
27
exclude_map: {
28
Net::IMAP => %i[BodyTypeAttachment BodyTypeExtension], # deprecated
29
},
30
- exclude: [
31
- /\n(?!\z)/n, # TODO (in Net::IMAP#put_string)
32
- ]
33
).to_h
34
)
35
0 commit comments