Skip to content

Commit

Permalink
Fix rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
jaynetics committed Oct 10, 2023
1 parent 104ed92 commit d76f7a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/expression/methods/printing_spec.rb
Expand Up @@ -19,7 +19,7 @@

RSpec.describe('Expression::Shared#pretty_print') do
it 'works' do
require 'pp' # rubocop:disable Lint/RedundantRequireStatement
require 'pp'
pp_to_s = ->(arg) { ''.dup.tap { |buffer| PP.new(buffer).pp(arg) } }

root = Regexp::Parser.parse(/(a)+/)
Expand Down
3 changes: 2 additions & 1 deletion spec/scanner/sets_spec.rb
Expand Up @@ -87,7 +87,8 @@
include_examples 'scan', /[a-bd-f]/, 2 => [:set, :range, '-', 2, 3]
include_examples 'scan', /[a-cd-f]/, 5 => [:set, :range, '-', 5, 6]
# this is a buggy range, it matches only `c`, but not `a`, `b` or `-`
include_examples 'scan', /[a-[c]]/, 2 => [:set, :range, '-', 2, 3]
# (this is a string to work around a rubocop error in Lint/MixedCaseRange)
include_examples 'scan', '[a-[c]]', 2 => [:set, :range, '-', 2, 3]
# these are not ranges, they match `a`, `c` and `-` (or non-`-` if negated)
include_examples 'scan', /[[a]-[c]]/, 4 => [:literal, :literal, '-', 4, 5]
include_examples 'scan', /[[a]-c]/, 4 => [:literal, :literal, '-', 4, 5]
Expand Down

0 comments on commit d76f7a5

Please sign in to comment.