Commit ab66d73
Change: Issue Caused By Ruby Bug
Why This Change Is Necessary
========================================================================
When `require 'enumerator'` is used in code, it somehow ends up
causing `LoadError: cannot load such file -- enumerator` errors.
I believe this is caused by a [ruby issue][3] but it's since been merged
and still appears to be a problem so I'm just going to try to resolve it
myself.
What These Changes Do To Address the Issue
========================================================================
I believe this should be caused entirely by the name of the file and not
by the name of the class. I'm going to attempt to rename the file and
see if that fixes the issue.
The `refinements.rb` file has been updated to load the proper file and
the filenames have been renamed.
Caveats
------------------------------------------------------------------------
Technically this is a backwards-incompatible change because someone
somewhere could be manually loading the refinement, but seeing as how it
is currently loaded immediately when the gem loads, I don't see that as
a common occurrence.
We are also being bad and not renaming the module to reflect the class
name, but I think it's worth it to get the fix in without a major
breaking change.
Side Effects Caused By This Change
========================================================================
Users who are manually requiring the enumerator refinement file, will
start to break.
------------------------------------------------------------------------
**Relevant URLs:**
* [Issue Link][1]
* [PR Link][2]
* [Ruby Issue][3]
**Actions:**
* Closes 175
* Closes 176
------------------------------------------------------------------------
[1]: #175
[2]: #176
[3]: https://bugs.ruby-lang.org/issues/109021 parent 2616f99 commit ab66d73
File tree
3 files changed
+2
-2
lines changed- lib/ruby-progressbar
- refinements
- spec/lib/ruby-progressbar/refinements
3 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
File renamed without changes.
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments