activesupport 3.1.1.rc2 → 3.1.1.rc3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of activesupport might be problematic. Click here for more details.
- data/CHANGELOG +8 -0
- data/lib/active_support/cache/file_store.rb +1 -0
- data/lib/active_support/core_ext/object/try.rb +0 -2
- data/lib/active_support/core_ext/string/output_safety.rb +13 -11
- data/lib/active_support/core_ext/time/calculations.rb +1 -1
- data/lib/active_support/version.rb +1 -1
- metadata +4 -4
data/CHANGELOG
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
*Rails 3.1.1 (unreleased)*
|
2
2
|
|
3
|
+
* ruby193: String#prepend is also unsafe [Akira Matsuda]
|
4
|
+
|
5
|
+
* Fix obviously breakage of Time.=== for Time subclasses [jeremyevans]
|
6
|
+
|
7
|
+
* Added fix so that file store does not raise an exception when cache dir does
|
8
|
+
not exist yet. This can happen if a delete_matched is called before anything
|
9
|
+
is saved in the cache. [Philippe Huibonhoa]
|
10
|
+
|
3
11
|
* Fixed performance issue where TimeZone lookups would require tzinfo each time [Tim Lucas]
|
4
12
|
|
5
13
|
* ActiveSupport::OrderedHash is now marked as extractable when using Array#extract_options! [Prem Sichanugrist]
|
@@ -75,7 +75,7 @@ end
|
|
75
75
|
|
76
76
|
module ActiveSupport #:nodoc:
|
77
77
|
class SafeBuffer < String
|
78
|
-
UNSAFE_STRING_METHODS = ["capitalize", "chomp", "chop", "delete", "downcase", "gsub", "lstrip", "next", "reverse", "rstrip", "slice", "squeeze", "strip", "sub", "succ", "swapcase", "tr", "tr_s", "upcase"].freeze
|
78
|
+
UNSAFE_STRING_METHODS = ["capitalize", "chomp", "chop", "delete", "downcase", "gsub", "lstrip", "next", "reverse", "rstrip", "slice", "squeeze", "strip", "sub", "succ", "swapcase", "tr", "tr_s", "upcase", "prepend"].freeze
|
79
79
|
|
80
80
|
alias_method :original_concat, :concat
|
81
81
|
private :original_concat
|
@@ -136,16 +136,18 @@ module ActiveSupport #:nodoc:
|
|
136
136
|
end
|
137
137
|
|
138
138
|
for unsafe_method in UNSAFE_STRING_METHODS
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
139
|
+
if 'String'.respond_to?(unsafe_method)
|
140
|
+
class_eval <<-EOT, __FILE__, __LINE__ + 1
|
141
|
+
def #{unsafe_method}(*args)
|
142
|
+
super.to_str
|
143
|
+
end
|
144
|
+
|
145
|
+
def #{unsafe_method}!(*args)
|
146
|
+
@dirty = true
|
147
|
+
super
|
148
|
+
end
|
149
|
+
EOT
|
150
|
+
end
|
149
151
|
end
|
150
152
|
|
151
153
|
protected
|
@@ -9,7 +9,7 @@ class Time
|
|
9
9
|
class << self
|
10
10
|
# Overriding case equality method so that it returns true for ActiveSupport::TimeWithZone instances
|
11
11
|
def ===(other)
|
12
|
-
other.is_a?(::
|
12
|
+
super || (self == Time && other.is_a?(ActiveSupport::TimeWithZone))
|
13
13
|
end
|
14
14
|
|
15
15
|
# Return the number of days in the given month.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activesupport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 977940592
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 1
|
9
9
|
- 1
|
10
|
-
-
|
11
|
-
version: 3.1.1.
|
10
|
+
- rc3
|
11
|
+
version: 3.1.1.rc3
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- David Heinemeier Hansson
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
19
|
+
date: 2011-10-05 00:00:00 -02:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|