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.

@@ -19,7 +19,7 @@ class ERB
19
19
  if s.html_safe?
20
20
  s
21
21
  else
22
- s.gsub(/[&"><]/) { |special| HTML_ESCAPE[special] }.html_safe
22
+ s.to_s.gsub(/&/, "&amp;").gsub(/\"/, "&quot;").gsub(/>/, "&gt;").gsub(/</, "&lt;").html_safe
23
23
  end
24
24
  end
25
25
 
@@ -130,14 +130,18 @@ module ActiveSupport
130
130
  end
131
131
 
132
132
  def merge!(other_hash)
133
- other_hash.each {|k,v| self[k] = v }
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.
@@ -2,7 +2,7 @@ module ActiveSupport
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 2
4
4
  MINOR = 3
5
- TINY = 12
5
+ TINY = 14
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
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: 27
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 3
9
- - 12
10
- version: 2.3.12
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-06-08 00:00:00 Z
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.2
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.