summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/coderay/encoders/html/output.rb2
-rw-r--r--lib/coderay/scanners/java.rb2
-rw-r--r--lib/coderay/scanners/sql.rb2
-rw-r--r--lib/coderay/tokens.rb3
4 files changed, 5 insertions, 4 deletions
diff --git a/lib/coderay/encoders/html/output.rb b/lib/coderay/encoders/html/output.rb
index de6f6ea..ee87fea 100644
--- a/lib/coderay/encoders/html/output.rb
+++ b/lib/coderay/encoders/html/output.rb
@@ -76,8 +76,6 @@ module Encoders
apply_title! title
end
self
- when nil
- return self
else
raise "Unknown value %p for :wrap" % element
end
diff --git a/lib/coderay/scanners/java.rb b/lib/coderay/scanners/java.rb
index 982a796..a490ec6 100644
--- a/lib/coderay/scanners/java.rb
+++ b/lib/coderay/scanners/java.rb
@@ -20,7 +20,7 @@ module Scanners
MAGIC_VARIABLES = %w[ this super ] # :nodoc:
TYPES = %w[
boolean byte char class double enum float int interface long
- short void
+ short void var
] << '[]' # :nodoc: because int[] should be highlighted as a type
DIRECTIVES = %w[
abstract extends final implements native private protected public
diff --git a/lib/coderay/scanners/sql.rb b/lib/coderay/scanners/sql.rb
index 7d57f77..c8725a8 100644
--- a/lib/coderay/scanners/sql.rb
+++ b/lib/coderay/scanners/sql.rb
@@ -29,7 +29,7 @@ module Scanners
char varchar varchar2 enum binary text tinytext mediumtext
longtext blob tinyblob mediumblob longblob timestamp
date time datetime year double decimal float int
- integer tinyint mediumint bigint smallint unsigned bit
+ integer tinyint mediumint bigint smallint unsigned bit numeric
bool boolean hex bin oct
)
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