From cfb38319bcc96b39d75133925c9f5095178067d0 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Sun, 27 Jun 2010 18:22:14 -0300 Subject: Makes more sense to ask about method_defined? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- activesupport/lib/active_support/core_ext/string/conversions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/core_ext/string/conversions.rb b/activesupport/lib/active_support/core_ext/string/conversions.rb index af277f9995..857ecfaa54 100644 --- a/activesupport/lib/active_support/core_ext/string/conversions.rb +++ b/activesupport/lib/active_support/core_ext/string/conversions.rb @@ -30,7 +30,7 @@ class String def getbyte(index) self[index] - end if RUBY_VERSION < '1.9' + end unless method_defined?(:getbyte) # Form can be either :utc (default) or :local. def to_time(form = :utc) -- cgit v1.2.3