aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/time
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext/time')
-rw-r--r--activesupport/lib/active_support/core_ext/time/publicize_conversion_methods.rb2
1 files changed, 1 insertions, 1 deletions
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
index fc3f297843..e1878d3c20 100644
--- a/activesupport/lib/active_support/core_ext/time/publicize_conversion_methods.rb
+++ b/activesupport/lib/active_support/core_ext/time/publicize_conversion_methods.rb
@@ -3,7 +3,7 @@ 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 (m = instance_method(method) rescue nil) && private_instance_methods.include?(m.name)
+ if private_instance_methods.include?(method) || private_instance_methods.include?(method.to_sym)
public method
end
end