Skip to content

Commit

Permalink
Fix a build error (#278)
Browse files Browse the repository at this point in the history
This PR fixes the following build error when using Ruby 3.4dev:

```console
$ ruby -v
ruby 3.4.0dev (2024-02-24T04:19:37Z master e9e752c7ef) [x86_64-darwin23]
$ bundle exec rspec ./spec/rubocop/ast/node_spec.rb:322
Run options: include {:locations=>{"./spec/rubocop/ast/node_spec.rb"=>[322]}}

Randomized with seed 21659
F

Failures:

  1) RuboCop::AST::Node#pure? for a regexp with no interpolation returns true
     Failure/Error: let(:src) { URI::DEFAULT_PARSER.make_regexp.inspect }

     NameError:
       uninitialized constant URI
     # ./spec/rubocop/ast/node_spec.rb:320:in 'block (5 levels) in <top (required)>'
     # ./spec/rubocop/ast/node_spec.rb:4:in 'block (2 levels) in <top (required)>'
     # ./spec/rubocop/ast/node_spec.rb:5:in 'block (2 levels) in <top (required)>'
     # ./spec/rubocop/ast/node_spec.rb:323:in 'block (5 levels) in <top (required)>'

Finished in 0.00259 seconds (files took 0.32884 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/rubocop/ast/node_spec.rb:322 # RuboCop::AST::Node#pure? for a regexp with no interpolation returns true
```
  • Loading branch information
koic authored Feb 24, 2024
1 parent ffa2f76 commit 38e4648
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/rubocop/ast/node_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require 'uri'

RSpec.describe RuboCop::AST::Node do
let(:ast) { parse_source(src).node }
let(:node) { ast }
Expand Down

0 comments on commit 38e4648

Please sign in to comment.