From dc767fca8ae78cf5760d3bf1d7e7150fde6c5951 Mon Sep 17 00:00:00 2001 From: Jun Aruga Date: Thu, 14 Feb 2019 15:17:56 +0100 Subject: Add Ruby 2.6 fixing issues * Remove existing Tokens#filter (Array#filter) for Ruby 2.6 compatibility. * Install proper version's rdoc considering installed Ruby version. --- lib/coderay/tokens.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/coderay') diff --git a/lib/coderay/tokens.rb b/lib/coderay/tokens.rb index e7bffce..b5f78e7 100644 --- a/lib/coderay/tokens.rb +++ b/lib/coderay/tokens.rb @@ -39,6 +39,9 @@ module CodeRay # You can serialize it to a JSON string and store it in a database, pass it # around to encode it more than once, send it to other algorithms... class Tokens < Array + # Remove Array#filter that is a new alias for Array#select on Ruby 2.6, + # for method_missing called with filter method. + undef_method :filter if instance_methods.include?(:filter) # The Scanner instance that created the tokens. attr_accessor :scanner -- cgit v1.2.1