Class: Set
- Includes:
- Roby::DRoby::V5::Builtins::SetDumper
- Defined in:
- lib/roby/backports.rb,
lib/roby/support.rb
Overview
List of backports waiting to be accepted in the backports gem
Instance Method Summary collapse
-
#compare_by_identity ⇒ Object
Defined in 2.4.0.
-
#compare_by_identity? ⇒ Boolean
Defined in 2.4.0.
- #inspect ⇒ Object
- #intersect?(set) ⇒ Boolean
Methods included from Roby::DRoby::V5::Builtins::SetDumper
Instance Method Details
#compare_by_identity ⇒ Object
Defined in 2.4.0
Hash#compare_by_identity appeared in ruby 1.9.1
6 7 8 |
# File 'lib/roby/backports.rb', line 6 def compare_by_identity @hash.compare_by_identity end |
#compare_by_identity? ⇒ Boolean
Defined in 2.4.0
Hash#compare_by_identity? appeard in ruby 1.9.1
13 14 15 |
# File 'lib/roby/backports.rb', line 13 def compare_by_identity? @hash.compare_by_identity? end |
#inspect ⇒ Object
56 57 58 |
# File 'lib/roby/support.rb', line 56 def inspect to_s end |
#intersect?(set) ⇒ Boolean
61 62 63 64 65 66 67 68 |
# File 'lib/roby/support.rb', line 61 def intersect?(set) set.is_a?(Set) or raise ArgumentError, "value must be a set" if size < set.size any? { |o| set.include?(o) } else set.any? { |o| include?(o) } end end |