From 028f91277defa7742c78788db69db3082b4f70e0 Mon Sep 17 00:00:00 2001 From: Arun Agrawal Date: Wed, 3 Jul 2013 19:40:24 +0200 Subject: Remove deprecated `DateTime.local_offset` --- activesupport/CHANGELOG.md | 4 ++++ .../lib/active_support/core_ext/date_time/calculations.rb | 7 ------- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'activesupport') diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 4fa22f42c3..17481e1389 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,7 @@ +* Remove deprecated `DateTime.local_offset` in favor of `DateTime.civil_from_fromat`. + + *Arun Agrawal* + * Remove deprecated `Logger` core extensions (`core_ext/logger.rb`). *Carlos Antonio da Silva* diff --git a/activesupport/lib/active_support/core_ext/date_time/calculations.rb b/activesupport/lib/active_support/core_ext/date_time/calculations.rb index 937567440b..ff59be0022 100644 --- a/activesupport/lib/active_support/core_ext/date_time/calculations.rb +++ b/activesupport/lib/active_support/core_ext/date_time/calculations.rb @@ -3,13 +3,6 @@ require 'active_support/deprecation' class DateTime class << self - # *DEPRECATED*: Use +DateTime.civil_from_format+ directly. - def local_offset - ActiveSupport::Deprecation.warn 'DateTime.local_offset is deprecated. Use DateTime.civil_from_format directly.' - - ::Time.local(2012).utc_offset.to_r / 86400 - end - # Returns Time.zone.now.to_datetime when Time.zone or # config.time_zone are set, otherwise returns # Time.now.to_datetime. -- cgit v1.2.3 From c9bbac46ddfc68caff6cd8a95c8d0fd045bd9201 Mon Sep 17 00:00:00 2001 From: Arun Agrawal Date: Wed, 3 Jul 2013 19:42:34 +0200 Subject: Remove deprecated `Module#local_constant_names` in favor of `Module#local_constants` --- activesupport/CHANGELOG.md | 4 ++++ .../lib/active_support/core_ext/module/introspection.rb | 16 ---------------- 2 files changed, 4 insertions(+), 16 deletions(-) (limited to 'activesupport') diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 17481e1389..194fda7248 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,7 @@ +* Remove deprecated `Module#local_constant_names` in favor of `Module#local_constants`. + + *Arun Agrawal* + * Remove deprecated `DateTime.local_offset` in favor of `DateTime.civil_from_fromat`. *Arun Agrawal* diff --git a/activesupport/lib/active_support/core_ext/module/introspection.rb b/activesupport/lib/active_support/core_ext/module/introspection.rb index 08e5f8a5c3..f1d26ef28f 100644 --- a/activesupport/lib/active_support/core_ext/module/introspection.rb +++ b/activesupport/lib/active_support/core_ext/module/introspection.rb @@ -59,20 +59,4 @@ class Module def local_constants #:nodoc: constants(false) end - - # *DEPRECATED*: Use +local_constants+ instead. - # - # Returns the names of the constants defined locally as strings. - # - # module M - # X = 1 - # end - # M.local_constant_names # => ["X"] - # - # This method is useful for forward compatibility, since Ruby 1.8 returns - # constant names as strings, whereas 1.9 returns them as symbols. - def local_constant_names - ActiveSupport::Deprecation.warn 'Module#local_constant_names is deprecated, use Module#local_constants instead' - local_constants.map { |c| c.to_s } - end end -- cgit v1.2.3 From 36321d85e9975da7ef2667882cab742f9db0ad4b Mon Sep 17 00:00:00 2001 From: Arun Agrawal Date: Wed, 3 Jul 2013 19:46:01 +0200 Subject: Remove deprecated `String#encoding_aware?` core extensions (`core_ext/string/encoding`). --- activesupport/CHANGELOG.md | 4 ++++ activesupport/lib/active_support/core_ext/string/encoding.rb | 8 -------- activesupport/test/abstract_unit.rb | 1 - activesupport/test/core_ext/string_ext_test.rb | 6 ------ 4 files changed, 4 insertions(+), 15 deletions(-) delete mode 100644 activesupport/lib/active_support/core_ext/string/encoding.rb (limited to 'activesupport') diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 194fda7248..8c07a034cc 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,7 @@ +* Remove deprecated `String#encoding_aware?` core extensions (`core_ext/string/encoding`). + + *Arun Agrawal* + * Remove deprecated `Module#local_constant_names` in favor of `Module#local_constants`. *Arun Agrawal* diff --git a/activesupport/lib/active_support/core_ext/string/encoding.rb b/activesupport/lib/active_support/core_ext/string/encoding.rb deleted file mode 100644 index a583b914db..0000000000 --- a/activesupport/lib/active_support/core_ext/string/encoding.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'active_support/deprecation' - -class String - def encoding_aware? - ActiveSupport::Deprecation.warn 'String#encoding_aware? is deprecated' - true - end -end diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb index dd17cb64f4..939bd7bfa8 100644 --- a/activesupport/test/abstract_unit.rb +++ b/activesupport/test/abstract_unit.rb @@ -8,7 +8,6 @@ ensure end require 'active_support/core_ext/kernel/reporting' -require 'active_support/core_ext/string/encoding' silence_warnings do Encoding.default_internal = "UTF-8" diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb index 8f0ebc13ea..12126fb9ef 100644 --- a/activesupport/test/core_ext/string_ext_test.rb +++ b/activesupport/test/core_ext/string_ext_test.rb @@ -651,12 +651,6 @@ class OutputSafetyTest < ActiveSupport::TestCase assert_equal 'foo'.to_yaml, 'foo'.html_safe.to_yaml(:foo => 1) end - test 'knows whether it is encoding aware' do - assert_deprecated do - assert 'ruby'.encoding_aware? - end - end - test "call to_param returns a normal string" do string = @string.html_safe assert string.html_safe? -- cgit v1.2.3