From 9d97173c5a3f023e50f85503c120fbad9d0b26d2 Mon Sep 17 00:00:00 2001 From: Sergey Nartimov Date: Thu, 22 Dec 2011 18:53:04 +0300 Subject: [PATCH] no more need to make Time#to_date and Time#to_datetime public they are public in actual 1.9 ruby version (tested at least in 1.9.2-p180) --- .../lib/active_support/core_ext/string/conversions.rb | 1 - .../lib/active_support/core_ext/time/conversions.rb | 1 - .../core_ext/time/publicize_conversion_methods.rb | 10 ---------- activesupport/lib/active_support/time.rb | 1 - 4 files changed, 13 deletions(-) delete mode 100644 activesupport/lib/active_support/core_ext/time/publicize_conversion_methods.rb diff --git a/activesupport/lib/active_support/core_ext/string/conversions.rb b/activesupport/lib/active_support/core_ext/string/conversions.rb index 73eedf5982a..541f969faa2 100644 --- a/activesupport/lib/active_support/core_ext/string/conversions.rb +++ b/activesupport/lib/active_support/core_ext/string/conversions.rb @@ -1,5 +1,4 @@ require 'date' -require 'active_support/core_ext/time/publicize_conversion_methods' require 'active_support/core_ext/time/calculations' class String diff --git a/activesupport/lib/active_support/core_ext/time/conversions.rb b/activesupport/lib/active_support/core_ext/time/conversions.rb index 49ac18d2450..5a17fc1afad 100644 --- a/activesupport/lib/active_support/core_ext/time/conversions.rb +++ b/activesupport/lib/active_support/core_ext/time/conversions.rb @@ -1,5 +1,4 @@ require 'active_support/inflector/methods' -require 'active_support/core_ext/time/publicize_conversion_methods' require 'active_support/values/time_zone' class Time diff --git a/activesupport/lib/active_support/core_ext/time/publicize_conversion_methods.rb b/activesupport/lib/active_support/core_ext/time/publicize_conversion_methods.rb deleted file mode 100644 index e1878d3c205..00000000000 --- a/activesupport/lib/active_support/core_ext/time/publicize_conversion_methods.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'date' - -class Time - # Ruby 1.8-cvs and early 1.9 series define private Time#to_date - %w(to_date to_datetime).each do |method| - if private_instance_methods.include?(method) || private_instance_methods.include?(method.to_sym) - public method - end - end -end diff --git a/activesupport/lib/active_support/time.rb b/activesupport/lib/active_support/time.rb index 4ef289a4149..9634b52ecf4 100644 --- a/activesupport/lib/active_support/time.rb +++ b/activesupport/lib/active_support/time.rb @@ -13,7 +13,6 @@ end require 'date' require 'time' -require 'active_support/core_ext/time/publicize_conversion_methods' require 'active_support/core_ext/time/marshal' require 'active_support/core_ext/time/acts_like' require 'active_support/core_ext/time/calculations'