Skip to content

Commit c0f6df8

Browse files
authored
Merge pull request #582 from sparklemotion/flavorjones-doc-20241119
update fork_safety doc strings and changelog
2 parents 48eb4fc + bd50e98 commit c0f6df8

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Added
66

77
- `Database#optimize` which wraps the `pragma optimize;` statement. Also added `Constants::Optimize` to allow advanced users to pass a bitmask of options. See https://www.sqlite.org/pragma.html#pragma_optimize. [#572] @alexcwatt @flavorjones
8+
- `SQLite3::VERSION_INFO` is a new constant that tracks a bag of metadata about the gem and the sqlite library used. `SQLite3::SQLITE_PACKAGED_LIBRARIES` and `SQLite3::SQLITE_PRECOMPILED_LIBRARIES` are new constants indicating how the gem was built. [#581] @flavorjones
89

910

1011
### Fixed

lib/sqlite3/fork_safety.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
require "weakref"
44

5-
# based on Rails's active_support/fork_tracker.rb
65
module SQLite3
6+
# based on Rails's active_support/fork_tracker.rb
77
module ForkSafety
8-
module CoreExt
8+
module CoreExt # :nodoc:
99
def _fork
1010
pid = super
1111
if pid == 0
@@ -20,17 +20,17 @@ def _fork
2020
@suppress = false
2121

2222
class << self
23-
def hook!
23+
def hook! # :nodoc:
2424
::Process.singleton_class.prepend(CoreExt)
2525
end
2626

27-
def track(database)
27+
def track(database) # :nodoc:
2828
@mutex.synchronize do
2929
@databases << WeakRef.new(database)
3030
end
3131
end
3232

33-
def discard
33+
def discard # :nodoc:
3434
warned = @suppress
3535
@databases.each do |db|
3636
next unless db.weakref_alive?

0 commit comments

Comments
 (0)