activesupport 3.0.8.rc4 → 3.0.8

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.

@@ -73,6 +73,7 @@ end
73
73
 
74
74
  module ActiveSupport #:nodoc:
75
75
  class SafeBuffer < String
76
+ UNSAFE_STRING_METHODS = ["capitalize", "chomp", "chop", "delete", "downcase", "gsub", "lstrip", "next", "reverse", "rstrip", "slice", "squeeze", "strip", "sub", "succ", "swapcase", "tr", "tr_s", "upcase"].freeze
76
77
  alias safe_concat concat
77
78
 
78
79
  def concat(value)
@@ -103,6 +104,18 @@ module ActiveSupport #:nodoc:
103
104
  def to_yaml(*args)
104
105
  to_str.to_yaml(*args)
105
106
  end
107
+
108
+ for unsafe_method in UNSAFE_STRING_METHODS
109
+ class_eval <<-EOT, __FILE__, __LINE__
110
+ def #{unsafe_method}(*args)
111
+ super.to_str
112
+ end
113
+
114
+ def #{unsafe_method}!(*args)
115
+ raise TypeError, "Cannot modify SafeBuffer in place"
116
+ end
117
+ EOT
118
+ end
106
119
  end
107
120
  end
108
121
 
@@ -3,7 +3,7 @@ module ActiveSupport
3
3
  MAJOR = 3
4
4
  MINOR = 0
5
5
  TINY = 8
6
- PRE = "rc4"
6
+ PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,15 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activesupport
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15424061
5
- prerelease: 6
4
+ hash: 23
5
+ prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
9
  - 8
10
- - rc
11
- - 4
12
- version: 3.0.8.rc4
10
+ version: 3.0.8
13
11
  platform: ruby
14
12
  authors:
15
13
  - David Heinemeier Hansson
@@ -17,7 +15,7 @@ autorequire:
17
15
  bindir: bin
18
16
  cert_chain: []
19
17
 
20
- date: 2011-05-31 00:00:00 Z
18
+ date: 2011-06-07 00:00:00 Z
21
19
  dependencies: []
22
20
 
23
21
  description: A toolkit of support libraries and Ruby core extensions extracted from the Rails framework. Rich support for multibyte strings, internationalization, time zones, and testing.
@@ -260,14 +258,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
260
258
  required_rubygems_version: !ruby/object:Gem::Requirement
261
259
  none: false
262
260
  requirements:
263
- - - ">"
261
+ - - ">="
264
262
  - !ruby/object:Gem::Version
265
- hash: 25
263
+ hash: 3
266
264
  segments:
267
- - 1
268
- - 3
269
- - 1
270
- version: 1.3.1
265
+ - 0
266
+ version: "0"
271
267
  requirements: []
272
268
 
273
269
  rubyforge_project: activesupport