summaryrefslogtreecommitdiff
path: root/spec/ruby/library/set/eql_spec.rb
blob: dd8e633775a830cf5d19d83a17532b9f8f806699 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require_relative '../../spec_helper'
require 'set'

describe "Set#eql?" do
  it "returns true when the passed argument is a Set and contains the same elements" do
    Set[].should eql(Set[])
    Set[1, 2, 3].should eql(Set[1, 2, 3])
    Set[1, 2, 3].should eql(Set[3, 2, 1])
    Set["a", :b, ?c].should eql(Set[?c, :b, "a"])

    Set[1, 2, 3].should_not eql(Set[1.0, 2, 3])
    Set[1, 2, 3].should_not eql(Set[2, 3])
    Set[1, 2, 3].should_not eql(Set[])
  end
end
/ruby.git/commit/regenc.c?h=v3_0_4&id=14b524b6b01bde70f207a049bd78899eb88823b8'>regenc.h/c: Define new function onigenc_not_support_case_mapduerst 2015-11-26* regcomp.c, regenc.c, regexec.c, regint.h, enc/unicode.c:naruse 2015-08-27oniguruma.h: constifynobu 2014-09-15* reg*.c: Merge Onigmo 5.15.0 38a870960aa7370051a3544naruse 2014-06-01constify rb_encoding and OnigEncodingnobu 2013-07-09Revert r41786 "broken utf-8"naruse 2013-07-05broken utf-8naruse 2012-02-17* Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820]naruse 2012-01-08* numeric.c (rb_enc_uint_char): raise RangeError when added codepointnaruse 2010-11-09Clean a warning.naruse 2010-11-09* regenc.c (onigenc_minimum_property_name_to_ctype):naruse 2009-09-22* regenc.h (PosixBracketEntryType): constified.nobu 2009-08-13* regenc.c (onigenc_strlen_null, onigenc_str_bytelen_null): fixednobu 2009-06-30* include/ruby/oniguruma.h, include/ruby/re.h, re.c, regcomp.c,nobu 2009-02-22stripped trailing spaces.nobu 2008-09-18* grapheme cluster implementation reverted. [ruby-dev:36375]akr 2008-09-16* include/ruby/oniguruma.h (OnigEncodingTypeST): add precise_retakr 2008-09-13* include/ruby/oniguruma.h (OnigEncodingTypeST): add end argument forakr 2008-09-13* include/ruby/oniguruma.h (ONIGENC_STEP_BACK): add end argument.akr 2008-09-13* include/ruby/oniguruma.h (onigenc_get_prev_char_head): add endakr 2008-09-13* include/ruby/oniguruma.hakr 2008-09-13* include/ruby/oniguruma.h (onigenc_get_right_adjust_char_head): addakr 2008-09-12* regenc.c (onigenc_single_byte_code_to_mbc): follow OnigEncodingakr 2008-08-06* regenc.c (code_to_mbc): raise RangeError Integer#chrnaruse 2008-07-01* regexec.c (stack_double): use MatchStackLimitSize atomically.nobu