activesupport 1.2.3 → 1.2.4

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,14 @@
1
+ *1.2.4* (December 7th, 2005)
2
+
3
+ * Rename Version constant to VERSION. #2802 [Marcel Molina Jr.]
4
+
5
+
1
6
  *1.2.3* (November 7th, 2005)
2
7
 
8
+ * Change Inflector#constantize to use eval instead of const_get. [Nicholas Seckar]
9
+
10
+ * Fix const_missing handler to ignore the trailing '.rb' on files when comparing paths. [Nicholas Seckar]
11
+
3
12
  * Define kernel.rb methods in "class Object" instead of "module Kernel" to work around a Windows peculiarity [Sam Stephenson]
4
13
 
5
14
  * Fix broken tests caused by incomplete loading of active support. [Nicholas Seckar]
@@ -196,7 +196,7 @@ class Module #:nodoc:
196
196
  return Object.const_get(class_id)
197
197
  rescue MissingSourceFile => e
198
198
  # Convert the exception to a NameError only if the file we are looking for is the missing one.
199
- raise unless e.path == "#{file_name}.rb"
199
+ raise unless e.is_missing? file_name
200
200
  raise NameError.new("uninitialized constant #{class_id}").copy_blame!(e)
201
201
  end
202
202
  end
@@ -142,9 +142,11 @@ module Inflector
142
142
  end
143
143
 
144
144
  def constantize(camel_cased_word)
145
- camel_cased_word.split("::").inject(Object) do |final_type, part|
146
- final_type = final_type.const_get(part)
147
- end
145
+ raise NameError, "#{camel_cased_word.inspect} is not a valid constant name!" unless
146
+ camel_cased_word.split("::").all? { |part| /^[A-Z]\w*$/ =~ part }
147
+
148
+ camel_cased_word = "::#{camel_cased_word}" unless camel_cased_word[0, 2] == '::'
149
+ Object.module_eval(camel_cased_word, __FILE__, __LINE__)
148
150
  end
149
151
 
150
152
  def ordinalize(number)
@@ -1,8 +1,8 @@
1
1
  module ActiveSupport
2
- module Version #:nodoc:
2
+ module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 2
5
- TINY = 3
5
+ TINY = 4
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: activesupport
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.2.3
7
- date: 2005-11-07 00:00:00 +01:00
6
+ version: 1.2.4
7
+ date: 2005-12-07 00:00:00 -06:00
8
8
  summary: Support and utility classes used by the Rails framework.
9
9
  require_paths:
10
10
  - lib