From 091965c0fc7384c17cce9e71a80f515b1139d460 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 29 Apr 2009 23:12:34 -0700 Subject: Prefer behavior check to RUBY_VERSION to catch 1.8 backports --- activesupport/lib/active_support/core_ext/string/conversions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/core_ext/string/conversions.rb') diff --git a/activesupport/lib/active_support/core_ext/string/conversions.rb b/activesupport/lib/active_support/core_ext/string/conversions.rb index 3f05db62c3..2b9f8c70f6 100644 --- a/activesupport/lib/active_support/core_ext/string/conversions.rb +++ b/activesupport/lib/active_support/core_ext/string/conversions.rb @@ -5,7 +5,7 @@ class String # 'a'.ord == 'a'[0] for Ruby 1.9 forward compatibility. def ord self[0] - end if RUBY_VERSION < '1.9' + end unless method_defined?(:ord) # Form can be either :utc (default) or :local. def to_time(form = :utc) -- cgit v1.2.3