Skip to content

Commit ff011cc

Browse files
committed
Fix Ruby 2.7 issue
1 parent cc303c9 commit ff011cc

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

.rubocop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ require: rubocop-rspec
22

33
AllCops:
44
NewCops: enable
5+
TargetRubyVersion: 2.7
56

67
Style/Documentation:
78
Enabled: false

spec/typesense/collections_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
describe '#create' do
3737
it 'creates a collection and returns it' do
3838
# since num_documents is a read-only attribute
39-
schema_for_creation = company_schema.except('num_documents')
39+
schema_for_creation = company_schema.reject { |key, _| key == 'num_documents' }
4040

4141
stub_request(:post, Typesense::ApiCall.new(typesense.configuration).send(:uri_for, '/collections', typesense.configuration.nodes[0]))
4242
.with(body: schema_for_creation,

0 commit comments

Comments
 (0)