-
Notifications
You must be signed in to change notification settings - Fork 1
Prefer ruby3 #11
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
Prefer ruby3 #11
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,7 @@ require "edits" | |
| desc "Compare metrics" | ||
| task :benchmark do | ||
| words = File.read("/usr/share/dict/words") | ||
| .split(/\n/).compact.shuffle(random: Random.new(1)) | ||
| .split("\n").compact.shuffle(random: Random.new(1)) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Layout/MultilineMethodCallIndentation: Align .split with .read on line 8. |
||
|
|
||
| Benchmark.bm(20) do |x| | ||
| x.report("Hamming") do | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ namespace :benchmark do | |
| desc "levenshtein distance vs distance_with_max (x100)" | ||
| task :lev_max do | ||
| words = File.read("/usr/share/dict/words") | ||
| .split(/\n/).compact.shuffle(random: Random.new(1)) | ||
| .split("\n").compact.shuffle(random: Random.new(1)) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Layout/MultilineMethodCallIndentation: Align .split with .read on line 10. |
||
| .take(101) | ||
|
|
||
| Benchmark.ips do |x| | ||
|
|
@@ -67,7 +67,7 @@ namespace :benchmark do | |
| desc "restricted distance vs distance_with_max (x100)" | ||
| task :restricted_max do | ||
| words = File.read("/usr/share/dict/words") | ||
| .split(/\n/).compact.shuffle(random: Random.new(1)) | ||
| .split("\n").compact.shuffle(random: Random.new(1)) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Layout/MultilineMethodCallIndentation: Align .split with .read on line 69. |
||
| .take(101) | ||
|
|
||
| Benchmark.ips do |x| | ||
|
|
@@ -126,7 +126,7 @@ namespace :benchmark do | |
| desc "most_similar vs min_by (100 words)" | ||
| task :lev_similar do | ||
| words = File.read("/usr/share/dict/words") | ||
| .split(/\n/).compact.shuffle(random: Random.new(1)) | ||
| .split("\n").compact.shuffle(random: Random.new(1)) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Layout/MultilineMethodCallIndentation: Align .split with .read on line 128. |
||
| .take(100) | ||
|
|
||
| Benchmark.ips do |x| | ||
|
|
||
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.
Lint/Syntax: unexpected token tCOMMA