Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/sqlite3/database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,9 @@ def step( *args )

def finalize
super(@ctx)
result = @ctx.result
@ctx = FunctionProxy.new
result
end
})
proxy.ctx = FunctionProxy.new
Expand Down
4 changes: 4 additions & 0 deletions test/test_integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,10 @@ def test_create_aggregate_without_block

value = @db.get_first_value( "select accumulate(a) from foo" )
assert_equal 6, value

# calling #get_first_value twice don't add up to the latest result
value = @db.get_first_value( "select accumulate(a) from foo" )
assert_equal 6, value
end

def test_create_aggregate_with_block
Expand Down