activesupport 3.1.1.rc2 → 3.1.1.rc3

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.

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]
@@ -173,6 +173,7 @@ module ActiveSupport
173
173
  end
174
174
 
175
175
  def search_dir(dir, &callback)
176
+ return if !File.exist?(dir)
176
177
  Dir.foreach(dir) do |d|
177
178
  next if d == "." || d == ".."
178
179
  name = File.join(dir, d)
@@ -28,8 +28,6 @@ class Object
28
28
  def try(*a, &b)
29
29
  if a.empty? && block_given?
30
30
  yield self
31
- elsif !a.empty? && !respond_to?(a.first)
32
- nil
33
31
  else
34
32
  __send__(*a, &b)
35
33
  end
@@ -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
- class_eval <<-EOT, __FILE__, __LINE__ + 1
140
- def #{unsafe_method}(*args)
141
- super.to_str
142
- end
143
-
144
- def #{unsafe_method}!(*args)
145
- @dirty = true
146
- super
147
- end
148
- EOT
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?(::Time)
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.
@@ -3,7 +3,7 @@ module ActiveSupport
3
3
  MAJOR = 3
4
4
  MINOR = 1
5
5
  TINY = 1
6
- PRE = "rc2"
6
+ PRE = "rc3"
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
9
9
  end
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: 977940595
4
+ hash: 977940592
5
5
  prerelease: true
6
6
  segments:
7
7
  - 3
8
8
  - 1
9
9
  - 1
10
- - rc2
11
- version: 3.1.1.rc2
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-09-29 00:00:00 -03:00
19
+ date: 2011-10-05 00:00:00 -02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency