From a606727606cc0725a39748dd9d310b2b064e3ca7 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 1 Aug 2009 18:34:41 -0700 Subject: Extract String#bytesize shim --- activesupport/lib/active_support/core_ext/string/bytesize.rb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 activesupport/lib/active_support/core_ext/string/bytesize.rb (limited to 'activesupport/lib/active_support/core_ext/string/bytesize.rb') 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 -- cgit v1.2.3