aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/string
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-06-27 18:22:14 -0300
committerJosé Valim <jose.valim@gmail.com>2010-06-28 01:26:01 +0200
commitcfb38319bcc96b39d75133925c9f5095178067d0 (patch)
treea784ea486be244ef673314b697d02c5081e6a8bd /activesupport/lib/active_support/core_ext/string
parent9b19a6f16cebf4257d2f0b839f6cc8ff5db5c47b (diff)
downloadrails-cfb38319bcc96b39d75133925c9f5095178067d0.tar.gz
rails-cfb38319bcc96b39d75133925c9f5095178067d0.tar.bz2
rails-cfb38319bcc96b39d75133925c9f5095178067d0.zip
Makes more sense to ask about method_defined?
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string')
-rw-r--r--activesupport/lib/active_support/core_ext/string/conversions.rb2
1 files changed, 1 insertions, 1 deletions
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)