-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix multiple inheritance-related bugs #241
Conversation
39bd645
to
b456681
Compare
Codecov Report
@@ Coverage Diff @@
## main #241 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 2
Lines 201 206 +5
=========================================
+ Hits 201 206 +5
Continue to review full report at Codecov.
|
270e62b
to
4dda71a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a suggestion on CHANGELOG
I can't review the code changes anyway
Well I guess I can run benchmark
Benchmark results `3.0.3`
`2.7.5`
|
4dda71a
to
0ebc2fb
Compare
9412bc9
to
5b09d6e
Compare
@@ -1,10 +1,8 @@ | |||
# frozen_string_literal: true | |||
|
|||
RSpec.shared_context "with context for module methods via scope 'class << self'" do | |||
# NOTE: This use of `before(:all)` is a performance optimization that shaves |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This no longer seemed necessary; our tests run in seconds in all Ruby versions as far as I can tell.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would prefer these in their own separate PR, is that ok?
@@ -1,10 +1,8 @@ | |||
# frozen_string_literal: true | |||
|
|||
RSpec.shared_context "with context for class methods via scope 'class << self'" do | |||
# NOTE: This use of `before(:all)` is a performance optimization that shaves |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This no longer seemed necessary; our tests run in seconds in all Ruby versions as far as I can tell.
504d69d
to
761d8aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JacobEvelyn I'm comfortable that the module_eval
approach doesn't seem to have race condition problems given the thread_safety_spec.rb
change to create a new class each loop iteration, meaning we are racing two threads to rewrite the method
This commit fixes several bugs related to inheritance by
delaying the calculation of the index used to store memoized
method results until the method itself is called. This incurs
a slight performance penalty the first time a method is called.
Closes #238
Closes #239
Before merging:
README.md
and update this PRCHANGELOG.md
, add an entry following Keep a Changelog guidelines with semantic versioning