Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d30e3d3

Browse files
rafayqayyumpicandocodigo
authored andcommitted
Fixed Dup on ES Aggregations
1 parent 797696a commit d30e3d3

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

‎elasticsearch-model/lib/elasticsearch/model/response/aggregations.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module Response
2222
class Aggregations < HashWrapper
2323
disable_warnings if respond_to?(:disable_warnings)
2424

25-
def initialize(attributes={})
25+
def initialize(attributes={},options={})
2626
__redefine_enumerable_methods super(attributes)
2727
end
2828

‎elasticsearch-model/spec/elasticsearch/model/response/aggregations_spec.rb‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,11 @@ def self.index_name; 'foo'; end
8080
expect(aggregations.price.max.value).to eq(99)
8181
end
8282
end
83+
84+
describe '#dup' do
85+
86+
it 'creates a copy of the aggregation' do
87+
expect(aggregations.dup).to eq(aggregations)
88+
end
89+
end
8390
end

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /