@@ -392,8 +392,8 @@ def clear
392
392
# Replace the contents of the set with the contents of +other+ and returns
393
393
# +self+.
394
394
#
395
- # +other+ may be another SequenceSet, or it may be an IMAP +sequence-set+
396
- # string, a number, a range, <tt>*</tt>, or an enumerable of these .
395
+ # +other+ may be another SequenceSet or any other object that would be
396
+ # accepted by ::new .
397
397
def replace ( other )
398
398
case other
399
399
when SequenceSet then initialize_dup ( other )
@@ -509,8 +509,9 @@ def hash; [self.class, string].hash end
509
509
510
510
# :call-seq: self === other -> true | false | nil
511
511
#
512
- # Returns whether +other+ is contained within the set. Returns +nil+ if a
513
- # StandardError is raised while converting +other+ to a comparable type.
512
+ # Returns whether +other+ is contained within the set. +other+ may be any
513
+ # object that would be accepted by ::new. Returns +nil+ if StandardError
514
+ # is raised while converting +other+ to a comparable type.
514
515
#
515
516
# Related: #cover?, #include?, #include_star?
516
517
def ===( other )
@@ -929,9 +930,7 @@ def merge(*sets)
929
930
# Removes all of the elements that appear in any of the given +sets+ from
930
931
# the set, and returns +self+.
931
932
#
932
- # The +sets+ may be any objects that would be accepted by ::new: non-zero
933
- # 32 bit unsigned integers, ranges, <tt>sequence-set</tt> formatted
934
- # strings, other sequence sets, or enumerables containing any of these.
933
+ # The +sets+ may be any objects that would be accepted by ::new.
935
934
#
936
935
# Related: #difference
937
936
def subtract ( *sets )
@@ -1573,9 +1572,8 @@ def input_to_tuples(set)
1573
1572
when Array then set . flat_map { input_to_tuples _1 }
1574
1573
when nil then [ ]
1575
1574
else
1576
- raise DataFormatError ,
1577
- "expected nz-number, range, string, or enumerable; " \
1578
- "got %p" % [ set ]
1575
+ raise DataFormatError , "expected nz-number, range, '*', Set, Array; " \
1576
+ "got %p" % [ set ]
1579
1577
end
1580
1578
end
1581
1579
0 commit comments