--001517510be0a9a5c304b58167f1
Content-Type: multipart/alternative; boundary=001517510be0a9a5ba04b58167ef

--001517510be0a9a5ba04b58167ef
Content-Type: text/plain; charset=ISO-8859-1

2012-12-01 Colin Scott <cs / cs.berkeley.edu>

* lib/set.rb (to_a): make to_ary an alias

Sets don't play very well with arrays. For example:

irb(main):001:0> require 'set'
true
irb(main):002:0> s  et.new
#<Set: {}>
irb(main):003:0> a  ]
[]
irb(main):004:0> s | a
#<Set: {}>
irb(main):005:0> a | s
*TypeError: can't convert Set into Array*

Set#to_a is already defined. By aliasing Set#to_ary to Set#to_a, the type
conversion works. This should not change the behavior of Sets otherwise.

--001517510be0a9a5ba04b58167ef
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<span class="Apple-style-span" style><div id=":4gn" class="ii gt adP adO" style="font-size:13px;margin-top:5px;margin-right:15px;margin-bottom:0px;margin-left:0px;padding-bottom:5px"><div id=":4l1"><span><div><span style="font-family:Times;background-color:rgb(255,255,255);font-size:medium"><pre style="white-space:pre-wrap">
2012-12-01 Colin Scott &lt;<a href="mailto:cs / cs.berkeley.edu" target="_blank" style="color:rgb(17,85,204)">cs / cs.berkeley.edu</a>&gt;</pre></span></div>* lib/set.rb (to_a): make to_ary an alias<div><br></div><div>Sets don&#39;t play very well with arrays. For example:</div>
<div><br></div><div><div>irb(main):001:0&gt; require &#39;set&#39;</div><div>=&gt; true</div><div>irb(main):002:0&gt; s = Set.new</div><div>=&gt; #&lt;Set: {}&gt;</div><div>irb(main):003:0&gt; a = []</div><div>=&gt;]</div>
<div>irb(main):004:0&gt; s | a</div><div>=&gt; #&lt;Set: {}&gt;</div><div>irb(main):005:0&gt; a | s</div><div><b>TypeError: can&#39;t convert Set into Array</b></div><div><br></div></div><div>Set#to_a is already defined. Byliasing Set#to_ary to Set#to_a, the type conversion works. This should not change the behavior of Sets otherwise.</div>
<div><br></div><div class="yj6qo"></div></span></div></div><div id=":4l2" class="hq gt" style="font-size:13px;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;clear:both"></div></span>

--001517510be0a9a5ba04b58167ef--
--001517510be0a9a5c304b58167f1
Content-Type: application/octet-stream; name="ruby-changes.patch"
Content-Disposition: attachment; filename="ruby-changes.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_gwwszstu0

SW5kZXg6IGxpYi9zZXQucmIKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gbGliL3NldC5yYgkocmV2aXNpb24gMzQx
NjcpCisrKyBsaWIvc2V0LnJiCSh3b3JraW5nIGNvcHkpCkBAIC0xNDUsNiArMTQ1LDkgQEAKICAg
ICBAaGFzaC5rZXlzCiAgIGVuZAogCisgICMgQWxpYXMgb2YgdG9fYQorICBhbGlhcyA6dG9fYXJ5
IDp0b19hCisKICAgZGVmIGZsYXR0ZW5fbWVyZ2Uoc2V0LCBzZWVuID0gU2V0Lm5ldykgIyA6bm9k
b2M6CiAgICAgc2V0LmVhY2ggeyB8ZXwKICAgICAgIGlmIGUuaXNfYT8oU2V0KQo--001517510be0a9a5c304b58167f1--