Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

String#bytesize is not needed for Ruby >= 1.8.7

  • Loading branch information...
commit 004db18cb0f690486336f0fa141ad383c79f9558 1 parent f8e713f
Xavier Noria fxn authored
2  actionpack/lib/action_controller/metal/streaming.rb
View
@@ -1,5 +1,3 @@
-require 'active_support/core_ext/string/bytesize'
-
module ActionController #:nodoc:
# Methods for sending arbitrary data and for streaming files to the browser,
# instead of rendering.
5 activesupport/lib/active_support/core_ext/string/bytesize.rb
View
@@ -1,5 +0,0 @@
-unless '1.9'.respond_to?(:bytesize)
- class String
- alias :bytesize :size
- end
-end
1  activesupport/lib/active_support/core_ext/string/interpolation.rb
View
@@ -6,7 +6,6 @@
=end
if RUBY_VERSION < '1.9'
- require 'active_support/core_ext/string/bytesize'
# KeyError is raised by String#% when the string contains a named placeholder
# that is not contained in the given arguments hash. Ruby 1.9 includes and
2  activesupport/lib/active_support/message_verifier.rb
View
@@ -1,5 +1,3 @@
-require 'active_support/core_ext/string/bytesize'
-
module ActiveSupport
# MessageVerifier makes it easy to generate and verify messages which are signed
# to prevent tampering.
7 activesupport/test/core_ext/string_ext_test.rb
View
@@ -350,13 +350,6 @@ def test_string_interpolation_raises_an_argument_error_when_mixing_named_and_unn
end
end
-class StringBytesizeTest < Test::Unit::TestCase
- def test_bytesize
- assert_respond_to 'foo', :bytesize
- assert_equal 3, 'foo'.bytesize
- end
-end
-
class OutputSafetyTest < ActiveSupport::TestCase
def setup
@string = "hello"
Please sign in to comment.
Something went wrong with that request. Please try again.