Permalink
Browse files

Merge pull request #20348 from johnnymugs/backport-compact-4-1

Restore collection proxy `#compact` in 4.1
  • Loading branch information...
rafaelfranca committed May 29, 2015
2 parents 2cbe94e + 1b94d1c commit a42f83982ca9ebe97d0824dba9fb539a17fa7682
@@ -40,7 +40,7 @@ def inherited(child_class)
BLACKLISTED_ARRAY_METHODS = [
:compact!, :flatten!, :reject!, :reverse!, :rotate!, :map!,
:shuffle!, :slice!, :sort!, :sort_by!, :delete_if,
:keep_if, :pop, :shift, :delete_at, :compact, :select!
:keep_if, :pop, :shift, :delete_at, :select!
].to_set # :nodoc:
delegate :to_xml, :to_yaml, :length, :collect, :map, :each, :all?, :include?, :to_ary, :join, to: :to_a
@@ -28,7 +28,7 @@ def call_method(target, method)
module DelegationWhitelistBlacklistTests
ARRAY_DELEGATES = [
:+, :-, :|, :&, :[],
:all?, :collect, :detect, :each, :each_cons, :each_with_index,
:all?, :collect, :compact, :detect, :each, :each_cons, :each_with_index,
:exclude?, :find_all, :flat_map, :group_by, :include?, :length,
:map, :none?, :one?, :partition, :reject, :reverse,
:sample, :second, :sort, :sort_by, :third,

0 comments on commit a42f839

Please sign in to comment.