Skip to content
This repository
Browse code

JRuby doesn't have UnboundMethod#name

  • Loading branch information...
commit fe34d10f0c6a22c6a87a6fef5f3ebce6c7af70c9 1 parent d8bdc4e
Jeremy Kemper jeremy authored
2  activesupport/lib/active_support/core_ext/time/publicize_conversion_methods.rb
@@ -3,7 +3,7 @@
3 3 class Time
4 4 # Ruby 1.8-cvs and early 1.9 series define private Time#to_date
5 5 %w(to_date to_datetime).each do |method|
6   - if (m = instance_method(method) rescue nil) && private_instance_methods.include?(m.name)
  6 + if private_instance_methods.include?(method) || private_instance_methods.include?(method.to_sym)
7 7 public method
8 8 end
9 9 end

0 comments on commit fe34d10

Please sign in to comment.
Something went wrong with that request. Please try again.