[#74190] [Ruby trunk Feature#12134] Comparison between `true` and `false` — duerst@...
SXNzdWUgIzEyMTM0IGhhcyBiZWVuIHVwZGF0ZWQgYnkgTWFydGluIETDvHJzdC4KCgpUc3V5b3No
3 messages
2016/03/07
[#74269] Type systems for Ruby — Rob Blanco <ml@...>
Dear ruby-core,
5 messages
2016/03/10
[#74395] [Ruby trunk Feature#12142] Hash tables with open addressing — shyouhei@...
Issue #12142 has been updated by Shyouhei Urabe.
3 messages
2016/03/17
[ruby-core:74498] [Ruby trunk Misc#12210] Add IdentitySet class that compares members by identity
From:
tjwp@...
Date:
2016-03-23 19:26:39 UTC
List:
ruby-core #74498
Issue #12210 has been reported by Tim Perkins.
----------------------------------------
Misc #12210: Add IdentitySet class that compares members by identity
https://bugs.ruby-lang.org/issues/12210
* Author: Tim Perkins
* Status: Open
* Priority: Normal
* Assignee:
----------------------------------------
This subclass of Set handles a use case that we ran into where we needed to track instances of objects that might compare as equal.
I was surprised that there was not a core way to do this. IdentitySet allows you to do the following (trivial example using strings):
~~~ruby
a_str = "a"
s = IdentitySet.new([a_str, a_str, "b", "b"])
p s # => #<IdentitySet: {"a", "b", "b"}>
~~~
---Files--------------------------------
identity_set.diff (1.18 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>