File tree 9 files changed +15
-7
lines changed
9 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 11
11
- 2.3
12
12
- 2.4.2
13
13
- 2.5
14
+ - 2.6
14
15
- ruby-head
15
16
- jruby
16
17
branches :
@@ -20,7 +21,6 @@ before_script:
20
21
- if (ruby -e "exit RUBY_VERSION.to_f >= 2.3"); then export RUBYOPT="--enable-frozen-string-literal"; fi; echo $RUBYOPT
21
22
matrix :
22
23
allow_failures :
23
- - rvm : 2.5
24
24
- rvm : ruby-head
25
25
- rvm : jruby
26
26
script : " rake test" # test:scanners"
Original file line number Diff line number Diff line change @@ -2,6 +2,12 @@ h1=. CodeRay Version History
2
2
3
3
p=. _This files lists all changes in the CodeRay library since the 0.9.8 release._
4
4
5
+ h2. Changes in 1.1.3
6
+
7
+ * Tokens: Ensure Ruby 2.6 compatibility. [#233, thanks to Jun Aruga]
8
+ * SQL scanner: Add @numeric@ data type. [#223, thanks to m16a1]
9
+ * Java scanner: Add @var@ as type. [#229, thanks to Davide Angelocola]
10
+
5
11
h2. Changes in 1.1.2
6
12
7
13
* Ruby future: Add support for frozen string literals. [#211, thanks to Pat Allan]
Original file line number Diff line number Diff line change @@ -14,5 +14,5 @@ group :development do
14
14
gem 'shoulda-context' , RUBY_VERSION < '1.9' ? '= 1.2.1' : '>= 1.2.1'
15
15
gem 'test-unit' , RUBY_VERSION < '1.9' ? '~> 2.0' : '>= 3.0'
16
16
gem 'json' , '>= 1.8' if RUBY_VERSION < '1.9'
17
- gem 'rdoc' , RUBY_VERSION < '1.9' ? '~> 4.2.2' : '>= 4. 2.2'
17
+ gem 'rdoc' , Gem :: Version . new ( RUBY_VERSION ) < Gem :: Version . new ( '1.9.3' ) ? '~> 4.2.2' : Gem :: Version . new ( RUBY_VERSION ) < Gem :: Version . new ( ' 2.2.2' ) ? '< 6' : '>= 6 '
18
18
end
Original file line number Diff line number Diff line change 2
2
3
3
[ ![ Build Status] ( https://travis-ci.org/rubychan/coderay.svg?branch=master )] ( https://travis-ci.org/rubychan/coderay )
4
4
[ ![ Gem Version] ( https://badge.fury.io/rb/coderay.svg )] ( https://badge.fury.io/rb/coderay )
5
- [ ![ Dependency Status] ( https://gemnasium.com/rubychan/coderay.svg )] ( https://gemnasium.com/rubychan/coderay )
6
5
7
6
## About
8
7
Original file line number Diff line number Diff line change @@ -76,8 +76,6 @@ def wrap! element, *args
76
76
apply_title! title
77
77
end
78
78
self
79
- when nil
80
- return self
81
79
else
82
80
raise "Unknown value %p for :wrap" % element
83
81
end
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class Java < Scanner
20
20
MAGIC_VARIABLES = %w[ this super ] # :nodoc:
21
21
TYPES = %w[
22
22
boolean byte char class double enum float int interface long
23
- short void
23
+ short void var
24
24
] << '[]' # :nodoc: because int[] should be highlighted as a type
25
25
DIRECTIVES = %w[
26
26
abstract extends final implements native private protected public
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ class SQL < Scanner
29
29
char varchar varchar2 enum binary text tinytext mediumtext
30
30
longtext blob tinyblob mediumblob longblob timestamp
31
31
date time datetime year double decimal float int
32
- integer tinyint mediumint bigint smallint unsigned bit
32
+ integer tinyint mediumint bigint smallint unsigned bit numeric
33
33
bool boolean hex bin oct
34
34
)
35
35
Original file line number Diff line number Diff line change @@ -39,6 +39,9 @@ module CodeRay
39
39
# You can serialize it to a JSON string and store it in a database, pass it
40
40
# around to encode it more than once, send it to other algorithms...
41
41
class Tokens < Array
42
+ # Remove Array#filter that is a new alias for Array#select on Ruby 2.6,
43
+ # for method_missing called with filter method.
44
+ undef_method :filter if instance_methods . include? ( :filter )
42
45
43
46
# The Scanner instance that created the tokens.
44
47
attr_accessor :scanner
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ def test_filtering_text_tokens
18
18
tokens . text_token i . to_s , :index
19
19
end
20
20
assert_equal tokens , CodeRay ::Encoders ::Filter . new . encode_tokens ( tokens )
21
+ assert_equal CodeRay ::Tokens , tokens . filter . class
21
22
assert_equal tokens , tokens . filter
22
23
end
23
24
@@ -32,6 +33,7 @@ def test_filtering_block_tokens
32
33
tokens . end_line :index
33
34
end
34
35
assert_equal tokens , CodeRay ::Encoders ::Filter . new . encode_tokens ( tokens )
36
+ assert_equal CodeRay ::Tokens , tokens . filter . class
35
37
assert_equal tokens , tokens . filter
36
38
end
37
39
You can’t perform that action at this time.
0 commit comments