aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorrick <rick@spacemonkey.local>2008-05-13 09:41:10 -0700
committerrick <rick@spacemonkey.local>2008-05-13 09:41:10 -0700
commit74fd17346f30fddba0e174ae17f5697f2c22279e (patch)
tree1267cea613ee4a73a2f5ddf3fb24d224dc8bbded /activesupport/lib
parentd09a8446d5606a5a0b5c024224b09a1318e9cf4d (diff)
parent4dedc7ddcaffa8c606af11ae2d32707131b99a2e (diff)
downloadrails-74fd17346f30fddba0e174ae17f5697f2c22279e.tar.gz
rails-74fd17346f30fddba0e174ae17f5697f2c22279e.tar.bz2
rails-74fd17346f30fddba0e174ae17f5697f2c22279e.zip
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb2
-rw-r--r--activesupport/lib/active_support/deprecation.rb13
-rw-r--r--activesupport/lib/active_support/json.rb29
-rw-r--r--activesupport/lib/active_support/version.rb2
4 files changed, 2 insertions, 44 deletions
diff --git a/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb b/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
index 371d074d34..8724a492bf 100644
--- a/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
+++ b/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
@@ -128,7 +128,7 @@ class Class # :nodoc:
new_inheritable_attributes = EMPTY_INHERITABLE_ATTRIBUTES
else
new_inheritable_attributes = inheritable_attributes.inject({}) do |memo, (key, value)|
- memo.update(key => (value.dup rescue value))
+ memo.update(key => value.duplicable? ? value.dup : value)
end
end
diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb
index 7613652c71..6aa379b550 100644
--- a/activesupport/lib/active_support/deprecation.rb
+++ b/activesupport/lib/active_support/deprecation.rb
@@ -176,19 +176,6 @@ module ActiveSupport
end
end
- class DeprecatedInstanceVariable < Delegator #:nodoc:
- def initialize(value, method)
- super(value)
- @method = method
- @value = value
- end
-
- def __getobj__
- ActiveSupport::Deprecation.warn("Instance variable @#{@method} is deprecated! Call instance method #{@method} instead.")
- @value
- end
- end
-
end
end
diff --git a/activesupport/lib/active_support/json.rb b/activesupport/lib/active_support/json.rb
index 914cf4f8fe..bbda2c9fa3 100644
--- a/activesupport/lib/active_support/json.rb
+++ b/activesupport/lib/active_support/json.rb
@@ -1,5 +1,3 @@
-
-
module ActiveSupport
# If true, use ISO 8601 format for dates and times. Otherwise, fall back to the ActiveSupport legacy format.
mattr_accessor :use_standard_json_time_format
@@ -19,33 +17,6 @@ module ActiveSupport
@escape_html_entities_in_json = value
end
end
-
- module JSON
- RESERVED_WORDS = %w(
- abstract delete goto private transient
- boolean do if protected try
- break double implements public typeof
- byte else import return var
- case enum in short void
- catch export instanceof static volatile
- char extends int super while
- class final interface switch with
- const finally long synchronized
- continue float native this
- debugger for new throw
- default function package throws
- ) #:nodoc:
-
- class << self
- def valid_identifier?(key) #:nodoc:
- key.to_s =~ /^[[:alpha:]_$][[:alnum:]_$]*$/ && !reserved_word?(key)
- end
-
- def reserved_word?(key) #:nodoc:
- RESERVED_WORDS.include?(key.to_s)
- end
- end
- end
end
require 'active_support/json/encoding'
diff --git a/activesupport/lib/active_support/version.rb b/activesupport/lib/active_support/version.rb
index 83fbaec62c..f3d141cf72 100644
--- a/activesupport/lib/active_support/version.rb
+++ b/activesupport/lib/active_support/version.rb
@@ -2,7 +2,7 @@ module ActiveSupport
module VERSION #:nodoc:
MAJOR = 2
MINOR = 0
- TINY = 2
+ TINY = 991
STRING = [MAJOR, MINOR, TINY].join('.')
end