Skip to content

Conversation

Earlopain
Copy link
Contributor

Checking the version causes an error when simplecov-html is loaded before simplecov:

require "bundler/inline"

gemfile(true) do
  source "https://rubygems.org"

  gem "simplecov-html"
  gem "simplecov"
end
/home/user/code/simplecov-html/lib/simplecov-html.rb:10:in '<top (required)>': uninitialized constant SimpleCov::VERSION (NameError)

major, minor, patch = SimpleCov::VERSION.scan(/\d+/).first(3).map(&:to_i)
                               ^^^^^^^^^
        from <internal:/home/user/.rbenv/versions/3.4-dev/lib/ruby/3.4.0+0/rubygems/core_ext/kernel_require.rb>:37:in 'Kernel#require'

I don't think this check is even needed anymore but I'd just leave it in

Checking the version causes an error when `simplecov-html` is loaded before `simplecov`:

```
require "bundler/inline"

gemfile(true) do
  source "https://rubygems.org"

  gem "simplecov-html"
  gem "simplecov"
end
```

```
/home/user/code/simplecov-html/lib/simplecov-html.rb:10:in '<top (required)>': uninitialized constant SimpleCov::VERSION (NameError)

major, minor, patch = SimpleCov::VERSION.scan(/\d+/).first(3).map(&:to_i)
                               ^^^^^^^^^
        from <internal:/home/user/.rbenv/versions/3.4-dev/lib/ruby/3.4.0+0/rubygems/core_ext/kernel_require.rb>:37:in 'Kernel#require'
```

I don't think this check is even needed anymore but I'd just leave it in
@Earlopain
Copy link
Contributor Author

Hi @amatsuda, sorry to be a bother. Could you consider merging this? I ran into this again and would appreciate you taking a look. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant