Permalink
Browse files

Makes more sense to ask about method_defined?

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent 9b19a6f commit cfb38319bcc96b39d75133925c9f5095178067d0 @spastorino spastorino committed with josevalim Jun 27, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/core_ext/string/conversions.rb
@@ -30,7 +30,7 @@ def ord
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)

0 comments on commit cfb3831

Please sign in to comment.