diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-08-01 18:34:41 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-08-01 18:34:41 -0700 |
commit | a606727606cc0725a39748dd9d310b2b064e3ca7 (patch) | |
tree | be6a576c37bee062433de27bc3e7f61714ce7b51 /activesupport/lib/active_support/core_ext/string/bytesize.rb | |
parent | cdf60e46cc01e5f7b14e95a0b7d914516fcdcbc1 (diff) | |
download | rails-a606727606cc0725a39748dd9d310b2b064e3ca7.tar.gz rails-a606727606cc0725a39748dd9d310b2b064e3ca7.tar.bz2 rails-a606727606cc0725a39748dd9d310b2b064e3ca7.zip |
Extract String#bytesize shim
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string/bytesize.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/bytesize.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/bytesize.rb b/activesupport/lib/active_support/core_ext/string/bytesize.rb new file mode 100644 index 0000000000..ed051b921e --- /dev/null +++ b/activesupport/lib/active_support/core_ext/string/bytesize.rb @@ -0,0 +1,5 @@ +unless '1.9'.respond_to?(:bytesize) + class String + alias :bytesize :size + end +end |