------art_157982_30787161.1156696494721
Content-Type: multipart/alternative; 
	boundary---art_157983_30478192.1156696494721"

------art_157983_30478192.1156696494721
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Nice quiz

Note to JEGII, much better like that ;)

I agree with those who pointed out that altough not difficult the challange
is to do it nicely.

Make Ruby shine!! (hey I've never seen that one before ;).

While I found it too difficult (to read;) to wrap around my solution is
extremly forgiving for typos - which might be a bad thing (e.g. "Tuh" is
interpreted as "Tue", but might have been intended as "Thu", but that
"feature" can easily be switched off of course)

OTOH it accepts its output as input again, i.e. one can write

Days.new "Mo-Friday", 7 "Mon-Fri,Sun"
Days.new "Sun,Mon-Fri" etc.etc

Cheers
Robert

------art_157983_30478192.1156696494721
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Nice quiz<br><br>Note to JEGII, much better like that ;)<br><br>I agree with those who pointed out that altough not difficult the challange is to do it nicely.<br><br>Make Ruby shine!! (hey I've never seen that one before ;).
<br><br>While I found it too difficult (to read;) to wrap around my solution is extremly forgiving for typos - which might be a bad thing (e.g. &quot;Tuh&quot; is interpreted as &quot;Tue&quot;, but might have been intended as &quot;Thu&quot;, but that &quot;feature&quot; can easily be switched off of course) 
<br><br>OTOH it accepts its output as input again, i.e. one can write<br><br>Days.new &quot;Mo-Friday&quot;, 7 t; &quot;Mon-Fri,Sun&quot;<br>Days.new &quot;Sun,Mon-Fri&quot; etc.etc<br><br>Cheers<br>Robert<br>

------art_157983_30478192.1156696494721--

------art_157982_30787161.1156696494721
Content-Type: application/octet-stream; name=days.rb
Content-Transfer-Encoding: base64
X-Attachment-Id: f_erdn04a5
Content-Disposition: attachment; filename="days.rb"

IyEvdXNyL2Jpbi9lbnYgcnVieQoKY2xhc3MgQXJyYXkKCWRlZiBmaXJzdD0gYXJnCgkJc2VsZlsw
XSA9IGFyZwoJZW5kCgoJZGVmIGxhc3Q9IGFyZwoJCXNlbGZ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+IDIK
CQkJCQkJZiA9IChMZWdhbERheVJlZ3MgPT09IGVsZW1lbnRzLmZpcnN0KQoJCQkJCQlsID0gKExl
Z2FsRGF5UmVncyA9PT0gZWxlbWVudHMubGFzdCkKCQkJCQkJKGYuLmwpLmVhY2h7IHxkfCBAZGF5
c1tkKzFdID0gdHJ1ZSB9CgkJCQkJfQoKCQkJCXdoZW4gSW50ZWdlcgoJCQkJCXJhaXNlIEFyZ3Vt
ZW50RXJyb3IsIAoJCQkJCSIje2FyZ30gaXMgbm90IGluc2lkZSB0aGUgbGVnYWwgcmFuZ2Ugb2Yg
ZGF5bnVtYmVycyAje0xlZ2FsRGF5TnVtYmVyc30iIHVubGVzcwoJCQkJCQlMZWdhbERheU51bWJl
cnMgPT09IGFyZwoJCQkJCUBkYXlzW2FyZ10gPSB0cnVlCgkJCQllbHNlCgkJCQkJcmFpc2UgQXJn
dW1lbnRFcnJvciwgCgkJCQkJIm9ubHkgU3RyaW5ncyBhbmQgSW50ZWdlcnMgYXJlIGFsbG93ZWQg
YXMgcGFyYW1ldGVycyBmb3IgRGF5cycgY29uc3RydWN0b3IsIG5vdCAje2FyZy5pbnNwZWN0fSBv
ZiAje2FyZy5jbGFzc30iCgkJCWVuZCAjIGNhc2UgYXJnCgkJZW5kCgllbmQKCiMJZGVmIHBhcnNl
X2RheSBkYXluYW1lCiMJCXJhaXNlIEFyZ3VtZW50RXJyb3IsIGRheW5hbWUuZHVwIDw8ICIgaXMg
bm90IGEgbGVnYWwgZGF5bmFtZSIJdW5sZXNzCiMJCQlkYXlfbmIgPSAoIEludGVybmFsRGF5TGlz
dC5pbmRleCggZGF5bmFtZS5kb3duY2FzZSApIHx8ICBMZWdhbERheVJlZ3MgPT09IGRheW5hbWUu
ZG93bmNhc2UgKSAKIwkJZGF5X25iICsgMQojCWVuZAplbmQgIyBEYXlzCg------art_157982_30787161.1156696494721
Content-Type: application/octet-stream; name=test_days.rb
Content-Transfer-Encoding: base64
X-Attachment-Id: f_erdn0p9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