Skip to content

Commit ad657e3

Browse files
committed
delete unused Tempfile monkey-patch for Ruby < 1.8.7
Ruby 2.0+ has been required since commit cce594e so this is dead code.
1 parent 6a5717c commit ad657e3

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

lib/sup/message_chunks.rb

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -35,30 +35,6 @@
3535
## included as quoted text during a reply. Text, Quotes, and mime-parsed
3636
## attachments are quotable; Signatures are not.
3737

38-
## monkey-patch time: make temp files have the right extension
39-
## Backport from Ruby 1.9.2 for versions lower than 1.8.7
40-
if RUBY_VERSION < '1.8.7'
41-
class Tempfile
42-
def make_tmpname(prefix_suffix, n)
43-
case prefix_suffix
44-
when String
45-
prefix = prefix_suffix
46-
suffix = ""
47-
when Array
48-
prefix = prefix_suffix[0]
49-
suffix = prefix_suffix[1]
50-
else
51-
raise ArgumentError, "unexpected prefix_suffix: #{prefix_suffix.inspect}"
52-
end
53-
t = Time.now.strftime("%Y%m%d")
54-
path = "#{prefix}#{t}-#{$$}-#{rand(0x100000000).to_s(36)}"
55-
path << "-#{n}" if n
56-
path << suffix
57-
end
58-
end
59-
end
60-
61-
6238
module Redwood
6339
module Chunk
6440
class Attachment

0 commit comments

Comments
 (0)