diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..4a36342 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.0.0 diff --git a/lib/words_counted.rb b/lib/words_counted.rb index 13efcdc..a851fdf 100644 --- a/lib/words_counted.rb +++ b/lib/words_counted.rb @@ -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 @@ -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 diff --git a/words_counted.gemspec b/words_counted.gemspec index be4056a..b0e1298 100644 --- a/words_counted.gemspec +++ b/words_counted.gemspec @@ -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"