1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

String#bytesize is not needed for Ruby >= 1.8.7

This commit is contained in:
Xavier Noria 2009-11-09 21:27:58 +01:00
parent f8e713f488
commit 004db18cb0
5 changed files with 0 additions and 17 deletions

View file

@ -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.

View file

@ -1,5 +0,0 @@
unless '1.9'.respond_to?(:bytesize)
class String
alias :bytesize :size
end
end

View file

@ -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

View file

@ -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.

View file

@ -350,13 +350,6 @@ class TestGetTextString < Test::Unit::TestCase
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"