summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2019-02-23 15:23:04 +0100
committerGitHub <noreply@github.com>2019-02-23 15:23:04 +0100
commit7818585e14039e56fb279399ea0a97ee2013068d (patch)
tree91fd0352c98985277e8fed3b4f2517ae11d55b24 /lib
parentd38502167541a1cd1b505a0e468e0098e3ae7538 (diff)
parentdc767fca8ae78cf5760d3bf1d7e7150fde6c5951 (diff)
downloadcoderay-7818585e14039e56fb279399ea0a97ee2013068d.tar.gz
Merge pull request #233 from junaruga/hotfix/ruby26-expression-enumerator
Add Ruby 2.6 fixing issues
Diffstat (limited to 'lib')
-rw-r--r--lib/coderay/tokens.rb3
1 files changed, 3 insertions, 0 deletions
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