Permalink
Browse files

Implemented getbyte as an aliased method and RDoc added

Signed-off-by: Xavier Noria <fxn@hashref.com>
  • Loading branch information...
1 parent f61d923 commit 6cc29ab65f7efc460aee1e374f100f03f32713a9 @spastorino spastorino committed with fxn Jun 27, 2010
Showing with 2 additions and 3 deletions.
  1. +2 −3 activesupport/lib/active_support/core_ext/string/conversions.rb
@@ -28,9 +28,8 @@ def ord
self[0]
end unless method_defined?(:ord)
- def getbyte(index)
- self[index]
- end unless method_defined?(:getbyte)
+ # +getbyte+ backport from Ruby 1.9
+ alias_method :getbyte, :[] unless method_defined?(:getbyte)
# Form can be either :utc (default) or :local.
def to_time(form = :utc)

0 comments on commit 6cc29ab

Please sign in to comment.