diff options
author | Xavier Noria <fxn@hashref.com> | 2013-11-24 20:00:24 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2013-11-24 20:00:24 +0100 |
commit | 17c29a0df0da5414570b025b642e90968e96cddc (patch) | |
tree | de1fd00eb2df79bf6bdcaeb74cc17365eaa53e33 /activesupport/lib/active_support/core_ext/object | |
parent | b4b30c048d22b14d51cc2f0f5b397bf899a9ce49 (diff) | |
parent | 28a6a7ea3bd627a8b6693a4cb8305b89467592b4 (diff) | |
download | rails-17c29a0df0da5414570b025b642e90968e96cddc.tar.gz rails-17c29a0df0da5414570b025b642e90968e96cddc.tar.bz2 rails-17c29a0df0da5414570b025b642e90968e96cddc.zip |
Merge remote-tracking branch 'docrails/master'
Conflicts:
activesupport/lib/active_support/core_ext/hash/deep_merge.rb
activesupport/lib/active_support/core_ext/hash/keys.rb
Diffstat (limited to 'activesupport/lib/active_support/core_ext/object')
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/deep_dup.rb | 12 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/json.rb | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/deep_dup.rb b/activesupport/lib/active_support/core_ext/object/deep_dup.rb index 1d639f3af6..2e99f4a1b8 100644 --- a/activesupport/lib/active_support/core_ext/object/deep_dup.rb +++ b/activesupport/lib/active_support/core_ext/object/deep_dup.rb @@ -8,8 +8,8 @@ class Object # dup = object.deep_dup # dup.instance_variable_set(:@a, 1) # - # object.instance_variable_defined?(:@a) #=> false - # dup.instance_variable_defined?(:@a) #=> true + # object.instance_variable_defined?(:@a) # => false + # dup.instance_variable_defined?(:@a) # => true def deep_dup duplicable? ? dup : self end @@ -22,8 +22,8 @@ class Array # dup = array.deep_dup # dup[1][2] = 4 # - # array[1][2] #=> nil - # dup[1][2] #=> 4 + # array[1][2] # => nil + # dup[1][2] # => 4 def deep_dup map { |it| it.deep_dup } end @@ -36,8 +36,8 @@ class Hash # dup = hash.deep_dup # dup[:a][:c] = 'c' # - # hash[:a][:c] #=> nil - # dup[:a][:c] #=> "c" + # hash[:a][:c] # => nil + # dup[:a][:c] # => "c" def deep_dup each_with_object(dup) do |(key, value), hash| hash[key.deep_dup] = value.deep_dup diff --git a/activesupport/lib/active_support/core_ext/object/json.rb b/activesupport/lib/active_support/core_ext/object/json.rb index 1a1fa1eedd..7c11d44f57 100644 --- a/activesupport/lib/active_support/core_ext/object/json.rb +++ b/activesupport/lib/active_support/core_ext/object/json.rb @@ -133,7 +133,7 @@ class BigDecimal # BigDecimal, it still has the chance to post-process the string and get the # real value. # - # Use <tt>ActiveSupport.use_standard_json_big_decimal_format = true</tt> to + # Use <tt>ActiveSupport.encode_big_decimal_as_string = true</tt> to # override this behavior. def as_json(options = nil) #:nodoc: if finite? |