activesupport 2.3.12 → 2.3.14
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of activesupport might be problematic. Click here for more details.
@@ -130,14 +130,18 @@ module ActiveSupport
|
|
130
130
|
end
|
131
131
|
|
132
132
|
def merge!(other_hash)
|
133
|
-
|
133
|
+
if block_given?
|
134
|
+
other_hash.each { |k, v| self[k] = key?(k) ? yield(k, self[k], v) : v }
|
135
|
+
else
|
136
|
+
other_hash.each { |k, v| self[k] = v }
|
137
|
+
end
|
134
138
|
self
|
135
139
|
end
|
136
140
|
|
137
141
|
alias_method :update, :merge!
|
138
142
|
|
139
|
-
def merge(other_hash)
|
140
|
-
dup.merge!(other_hash)
|
143
|
+
def merge(other_hash, &block)
|
144
|
+
dup.merge!(other_hash, &block)
|
141
145
|
end
|
142
146
|
|
143
147
|
# When replacing with another hash, the initial order of our keys must come from the other hash -ordered or not.
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activesupport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 2.3.
|
9
|
+
- 14
|
10
|
+
version: 2.3.14
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Heinemeier Hansson
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-08-16 00:00:00 Z
|
19
19
|
dependencies: []
|
20
20
|
|
21
21
|
description: Utility library which carries commonly used classes and goodies from the Rails framework
|
@@ -432,7 +432,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
432
432
|
requirements: []
|
433
433
|
|
434
434
|
rubyforge_project: activesupport
|
435
|
-
rubygems_version: 1.8.
|
435
|
+
rubygems_version: 1.8.8
|
436
436
|
signing_key:
|
437
437
|
specification_version: 3
|
438
438
|
summary: Support and utility classes used by the Rails framework.
|