--------------060801030200040103040403
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Matthew Moss wrote:

> Here is my partial solution for the Quoted Printable quiz.  I'm still
> pretty new to Ruby, so it took me a while to get what you see here.  I
> think the only thing I didn't get to adding was line length checks.

And here's mine as well. Sorry for being late -- I coded this up on 
Friday and forgot about it until today.

It ought to handle everything correctly (including proper wrapping of 
lines that end in encoded characters) and it does most of the work with 
a few simple regular expressions.

--------------060801030200040103040403
Content-Type: application/x-ruby;
 nameuoted_printable.rb"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filenameuoted_printable.rb"

bW9kdWxlIFF1b3RlZFByaW50YWJsZQ0KICBleHRlbmQgc2VsZg0KDQogICMgRW5jb2RlcyB0
ZXh0IGFzIHF1b3RlZCBwcmludGFibGUuIFRoZSBzZWNvbmQgYXJndW1lbnQgc3BlY2lmaWVz
IGNoYXJhY3RlcnMgdGhhdA0KICAjIHNob3VsZCBiZSBlbmNvZGVkIGluIGFkZGl0aW9uIHRv
IHRoZSBvbmVzIHRoYXQgYXJlIGF1dG9tYXRpY2FsbHkgcXVvdGVkIG9uZXMuDQogICMgSXQg
aXMgYSBzdHJpbmcgdGhhdCBzcGVjaWZpZXMgY2hhcmFjdGVycyBhbmQgY2hhcmFjdGVyIHJh
bmdlcyBhcyB0YWtlbiBieQ0KICAjIFN0cmluZyNkZWxldGUgYW5kIHNvIG9uLg0KICBkZWYg
ZW5jb2RlKHRleHQsIGFsc29fZW5jb2RlID0gIiIpDQogICAgdGV4dC5nc3ViKC9bXHQgXVxz
fFs9XHgwMC1ceDA4XHgwQi1ceDFGXHg3RS1ceEZGI3thbHNvX2VuY29kZX1dLykgZG8gfGNo
YXJ8DQogICAgICAiPSUwMlgiICUgY2hhclswXSArIGNoYXJbMSAuLiAtMV0NCiAgICBlbmQu
Z3N1YigvXiguezc1fSkoLnsyLH0pJC8pIGRvIHxtYXRjaHwNCiAgICAgIGJhc2UsIGNvbnRp
bnVhdG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