diff options
author | a_matsuda <a_matsuda@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-28 15:10:10 +0000 |
---|---|---|
committer | a_matsuda <a_matsuda@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-28 15:10:10 +0000 |
commit | 86793e09832e3f2619cf508afb86e7e598660454 (patch) | |
tree | 36f188759f31303f451eaac8538aefb932171022 /ext/tk/sample/tkfrom.rb | |
parent | 5f04b911a4542f65964193e3dd600992e6e5a94d (diff) | |
download | ruby-86793e09832e3f2619cf508afb86e7e598660454.tar.gz |
parsedate is no more available since 1.9
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/tkfrom.rb')
-rw-r--r-- | ext/tk/sample/tkfrom.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/tk/sample/tkfrom.rb b/ext/tk/sample/tkfrom.rb index 4c249884af..69a122ffe1 100644 --- a/ext/tk/sample/tkfrom.rb +++ b/ext/tk/sample/tkfrom.rb @@ -1,11 +1,8 @@ #!/usr/bin/env ruby # frozen_string_literal: false -require "parsedate" require "base64" -include ParseDate - class Mail def Mail.new(f) if !f.kind_of?(IO) @@ -107,7 +104,10 @@ for file in ARGV from = mail.header['From'] subj = mail.header['Subject'] y = m = d = 0 - y, m, d = parsedate(date) if date + if date + date = Date.parse(date) if date + y, m, d = date.year, date.mon, date.mday + end from = "sombody@somewhere" unless from subj = "(nil)" unless subj from = decode_b(from) |