commit ad657e383d6914c053b7cceff082c05c096d0245
parent 6a5717ce15cb23dbe7ddfe3db74b6f63d22034db
Author: Dan Callaghan <djc@djc.id.au>
Date: Mon, 6 Apr 2026 13:52:23 +1000
delete unused Tempfile monkey-patch for Ruby < 1.8.7
Ruby 2.0+ has been required since commit cce594e35 so this is dead code.
Diffstat:
1 file changed, 0 insertions(+), 24 deletions(-)
diff --git a/lib/sup/message_chunks.rb b/lib/sup/message_chunks.rb
@@ -35,30 +35,6 @@ require 'shellwords'
## included as quoted text during a reply. Text, Quotes, and mime-parsed
## attachments are quotable; Signatures are not.
-## monkey-patch time: make temp files have the right extension
-## Backport from Ruby 1.9.2 for versions lower than 1.8.7
-if RUBY_VERSION < '1.8.7'
- class Tempfile
- def make_tmpname(prefix_suffix, n)
- case prefix_suffix
- when String
- prefix = prefix_suffix
- suffix = ""
- when Array
- prefix = prefix_suffix[0]
- suffix = prefix_suffix[1]
- else
- raise ArgumentError, "unexpected prefix_suffix: #{prefix_suffix.inspect}"
- end
- t = Time.now.strftime("%Y%m%d")
- path = "#{prefix}#{t}-#{$$}-#{rand(0x100000000).to_s(36)}"
- path << "-#{n}" if n
- path << suffix
- end
- end
-end
-
-
module Redwood
module Chunk
class Attachment