diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-01-20 04:59:39 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-01-20 04:59:39 +0000 |
commit | 62e648e148b3cb9f96dcce808c55c02b7ccb4486 (patch) | |
tree | 9708892ece92e860d81559ab55e6b1f9400d7ffc /lib/mailread.rb | |
parent | aeb049c573be4dc24dd20650f40e4777e0f698cf (diff) |
ruby 1.3 cycle
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/RUBY@372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/mailread.rb')
-rw-r--r-- | lib/mailread.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/mailread.rb b/lib/mailread.rb index a5d60c84b4..5e46606c09 100644 --- a/lib/mailread.rb +++ b/lib/mailread.rb @@ -1,7 +1,7 @@ class Mail def initialize(f) - unless f.kind_of?(IO) + unless defined? f.gets f = open(f, "r") opened = true end @@ -15,7 +15,8 @@ class Mail break if /^$/ # end of header if /^(\S+):\s*(.*)/ - @header[attr = $1.capitalize!] = $2 + (attr = $1).capitalize! + @header[attr] = $2 elsif attr sub!(/^\s*/, '') @header[attr] += "\n" + $_ |