Describe the bug
failed in loading Rouge::Lexers::JSON5
TypeError: superclass must be a Class (Module given)
/usr/local/bundle/gems/rouge-4.5.0/lib/rouge/lexers/json5.rb:8:in `<module:Lexers>'
/usr/local/bundle/gems/rouge-4.5.0/lib/rouge/lexers/json5.rb:5:in `<module:Rouge>'
/usr/local/bundle/gems/rouge-4.5.0/lib/rouge/lexers/json5.rb:4:in `<main>'
/usr/local/bundle/gems/rouge-4.5.0/lib/rouge/lexer.rb:532:in `load'
/usr/local/bundle/gems/rouge-4.5.0/lib/rouge/lexer.rb:532:in `load_lexer'
/usr/local/bundle/gems/rouge-4.5.0/lib/rouge.rb:52:in `block in load_lexers'
/usr/local/bundle/gems/rouge-4.5.0/lib/rouge.rb:51:in `each'
/usr/local/bundle/gems/rouge-4.5.0/lib/rouge.rb:51:in `load_lexers'
/usr/local/bundle/gems/rouge-4.5.0/lib/rouge.rb:67:in `<main>'
It seems ::JSON is loaded instead of Rouge::Lexers::JSON.
Expected behavior
Successfully loaded without error
System (please complete the following information):
OS: Ubuntu 22.04 LTS
Ruby version 2.7.8
Rouge version: 4.5
Additional contextPathname.glob (seen in Rouge.load_lexers) returns unordered list in Ruby < 3.0, so Rouge::Lexers::JSON may not loaded before Rouge::Lexers::JSON5 in such environments.
Please note: This is for non-lexer bugs.
Describe the bug failed in loading
Rouge::Lexers::JSON5
It seems
::JSON
is loaded instead ofRouge::Lexers::JSON
.Expected behavior Successfully loaded without error
System (please complete the following information):
Additional context
Pathname.glob
(seen inRouge.load_lexers
) returns unordered list in Ruby < 3.0, soRouge::Lexers::JSON
may not loaded beforeRouge::Lexers::JSON5
in such environments.