Update README with minimal ruby (3.1) and s/match/match?#204
Open
esparta wants to merge 1 commit into
Open
Conversation
puts Benchmark.measure {
500_000.times do
Pusher::Channel.new('nl', 'yo', nil)
end
before
root@7f8cea552134:/src# ruby spec/benchmark.rb
0.342884 0.000089 0.342973 ( 0.344086)
after
ruby spec/benchmark.rb
0.272801 0.000000 0.272801 ( 0.273464)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In #200 the
gemspecfile was changed to enforce the requirement of a minimal version of ruby 3.1, this change was not reflected on theREADME.mdwhich still suggest that the gem supports ruby 2.6 and above.Took the opportunity to also change the use of
Regex#match?instead ofRegex#match, this change will gain a performance improvement - it was added in ruby 2.4, specially inPusher::Channelclass. If required I can open up a new PR about that.micro-benchmark:
before
after
CHANGELOG
Regex#match?instead ofRegex#matchto improve overall performance of the gemNotes
I didn't add the benchmark file, I can do that if the maintainers consider it worthy