diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-06-27 20:30:51 -0300 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-06-28 01:45:57 +0200 |
commit | 6cc29ab65f7efc460aee1e374f100f03f32713a9 (patch) | |
tree | 139308a1bf7ae928598833a7c58988aeb39f91ed /activesupport | |
parent | f61d923d284062b4e4864d81c603157020198d06 (diff) | |
download | rails-6cc29ab65f7efc460aee1e374f100f03f32713a9.tar.gz rails-6cc29ab65f7efc460aee1e374f100f03f32713a9.tar.bz2 rails-6cc29ab65f7efc460aee1e374f100f03f32713a9.zip |
Implemented getbyte as an aliased method and RDoc added
Signed-off-by: Xavier Noria <fxn@hashref.com>
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/conversions.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/conversions.rb b/activesupport/lib/active_support/core_ext/string/conversions.rb index 857ecfaa54..5b2cb6e331 100644 --- a/activesupport/lib/active_support/core_ext/string/conversions.rb +++ b/activesupport/lib/active_support/core_ext/string/conversions.rb @@ -28,9 +28,8 @@ class String 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) |