Skip to content

Commit

Permalink
Merge pull request #31 from werthen/master
Browse files Browse the repository at this point in the history
Make compatible with ruby 3.0.0
  • Loading branch information
abitdodgy authored Sep 25, 2021
2 parents e80c6aa + 735357e commit b2e63f0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0.0
4 changes: 2 additions & 2 deletions lib/words_counted.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module WordsCounted
# @param [Hash] options The options to pass onto `Counter`
# @return [WordsCounted::Counter] An instance of Counter
def self.count(input, options = {})
tokens = Tokeniser.new(input).tokenise(options)
tokens = Tokeniser.new(input).tokenise(**options)
Counter.new(tokens)
end

Expand All @@ -38,7 +38,7 @@ def self.count(input, options = {})
# @return [WordsCounted::Counter] An instance of Counter
def self.from_file(path, options = {})
tokens = File.open(path) do |file|
Tokeniser.new(file.read).tokenise(options)
Tokeniser.new(file.read).tokenise(**options)
end
Counter.new(tokens)
end
Expand Down
2 changes: 1 addition & 1 deletion words_counted.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "bundler"
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec"
spec.add_development_dependency "pry"
Expand Down

0 comments on commit b2e63f0

Please sign in to comment.