summaryrefslogtreecommitdiff
path: root/spec/ruby/core/array/select_spec.rb
blob: 298b59174495878c8fbf22457d3a7a40c12c3817 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require_relative '../../spec_helper'
require_relative 'shared/select'

describe "Array#select" do
  it_behaves_like :array_select, :select
end

describe "Array#select!" do
  it "returns nil if no changes were made in the array" do
    [1, 2, 3].select! { true }.should be_nil
  end

  it_behaves_like :keep_if, :select!
end