From c4824a00669aea957886cfda858b7415ae3ede89 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Fri, 15 Mar 2019 13:41:22 +0100 Subject: [PATCH] Drop Ruby 1.8, 1.9 compat layer for String --- lib/puma/compat.rb | 14 -------------- lib/puma/server.rb | 1 - 2 files changed, 15 deletions(-) delete mode 100644 lib/puma/compat.rb diff --git a/lib/puma/compat.rb b/lib/puma/compat.rb deleted file mode 100644 index a6e3d374..00000000 --- a/lib/puma/compat.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Provides code to work properly on 1.8 and 1.9 - -class String - unless method_defined? :bytesize - alias_method :bytesize, :size - end - - unless method_defined? :byteslice - def byteslice(*arg) - enc = self.encoding - self.dup.force_encoding(Encoding::ASCII_8BIT).slice(*arg).force_encoding(enc) - end - end -end diff --git a/lib/puma/server.rb b/lib/puma/server.rb index 3099adb6..e27a8c46 100644 --- a/lib/puma/server.rb +++ b/lib/puma/server.rb @@ -6,7 +6,6 @@ require 'puma/thread_pool' require 'puma/const' require 'puma/events' require 'puma/null_io' -require 'puma/compat' require 'puma/reactor' require 'puma/client' require 'puma/binder'