diff options
-rw-r--r-- | activesupport/lib/active_support/core_ext/time/publicize_conversion_methods.rb | 2 |
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 |