aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/json/encoding.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-01-05 23:31:46 -0800
committerJosé Valim <jose.valim@gmail.com>2012-01-05 23:31:46 -0800
commit75a630edf34d09bc57f3088136d418850abc4641 (patch)
treeb54d8b37ddc7c91d58054923a5212057ce6d9393 /activesupport/lib/active_support/json/encoding.rb
parente09c3c783433e01b11ee4ea12980340cc325472e (diff)
parent4311fc45dcfaee61ea6bfbd1631d6672b46f787b (diff)
downloadrails-75a630edf34d09bc57f3088136d418850abc4641.tar.gz
rails-75a630edf34d09bc57f3088136d418850abc4641.tar.bz2
rails-75a630edf34d09bc57f3088136d418850abc4641.zip
Merge pull request #4340 from rafaelfranca/patch-1
Remove more Array.wrap calls
Diffstat (limited to 'activesupport/lib/active_support/json/encoding.rb')
-rw-r--r--activesupport/lib/active_support/json/encoding.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/json/encoding.rb b/activesupport/lib/active_support/json/encoding.rb
index 07b6a940c6..0e1bf4c40b 100644
--- a/activesupport/lib/active_support/json/encoding.rb
+++ b/activesupport/lib/active_support/json/encoding.rb
@@ -5,7 +5,6 @@ require 'active_support/ordered_hash'
require 'bigdecimal'
require 'active_support/core_ext/big_decimal/conversions' # for #to_s
-require 'active_support/core_ext/array/wrap'
require 'active_support/core_ext/hash/except'
require 'active_support/core_ext/hash/slice'
require 'active_support/core_ext/object/instance_variables'
@@ -228,9 +227,9 @@ class Hash
# create a subset of the hash by applying :only or :except
subset = if options
if attrs = options[:only]
- slice(*Array.wrap(attrs))
+ slice(*Array(attrs))
elsif attrs = options[:except]
- except(*Array.wrap(attrs))
+ except(*Array(attrs))
else
self
end