Skip to content

Commit

Permalink
Implemented getbyte as an aliased method and RDoc added
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Noria <fxn@hashref.com>
  • Loading branch information
spastorino authored and fxn committed Jun 27, 2010
1 parent f61d923 commit 6cc29ab
Showing 1 changed file with 2 additions and 3 deletions.
Expand Up @@ -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)
Expand Down

0 comments on commit 6cc29ab

Please sign in to comment.