hnswlib 0.9.1 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d039b605b23755f39fee68b17ce99510c4465cc238baf51f5a281e42a2156040
4
- data.tar.gz: 9e5240e9ce75a79ad3ec738a64fdfd89e0c567c2677027f2c2910f44f8859186
3
+ metadata.gz: 3ddc5b6403c5ccc256534c136ff544c8e7e68fc4914cc894c1a28e56e57e139a
4
+ data.tar.gz: e503e0f85d3eefc5cf49f6ab5a21598f5b4205dc81bfd115e9d6ed4ab8bb4451
5
5
  SHA512:
6
- metadata.gz: 951470c326194f71838aa485ef0def8075e5e0dbe7f8b156afd4cf41851bb402e6a4a1338616e28c8aed16a887028a3a40b8687cc4e7170ca68d6a5212dd3fee
7
- data.tar.gz: f736ffefbb823e2edf59db9b5506d8659a690c1ddb97cdd907931c92c827afba1fb0ebfb1f817d8c80aefd7cdc8eb454f6cb63896c1894b8727b86f943f54d2c
6
+ metadata.gz: 197eb7d2d6b8319205b093413f13b28a5463106695f2f262d37a7de726fe09464e5389c230ddd4f9fa389d6ede077b0c9b643dd748c12467e6181cc3dd71ef06
7
+ data.tar.gz: 85ce6f7cce53275908c46cbaa5d341608096607433888c3ba78af03f3737c40eb2ba1c7f10753bdb128cdeabdd49bd82ef19c0d22c0cfcb85ffc0fa47aa3de6b
data/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
- ## [[0.9.1](https://github.com/yoshoku/hnswlib.rb/compare/v0.8.1...v0.9.0)] - 2025-11-23
1
+ ## [[0.9.3](https://github.com/yoshoku/hnswlib.rb/compare/v0.9.2...v0.9.3)] - 2026-02-17
2
+
3
+ - Fix to access map entry before erasing to prevent use-after-erase segmentation fault.
4
+
5
+ ## [[0.9.2](https://github.com/yoshoku/hnswlib.rb/compare/v0.9.1...v0.9.2)] - 2026-02-16
6
+
7
+ - Remove libstdc++ loading check from native extensions build step.
8
+
9
+ ## [[0.9.1](https://github.com/yoshoku/hnswlib.rb/compare/v0.9.0...v0.9.1)] - 2025-11-23
2
10
 
3
11
  - Fix to use require for compatibility with distributions installing extensions separately.
4
12
 
@@ -2,8 +2,6 @@
2
2
 
3
3
  require 'mkmf'
4
4
 
5
- abort 'libstdc++ is not found.' unless have_library('stdc++')
6
-
7
5
  $CXXFLAGS << ' -std=c++14'
8
6
  $INCFLAGS << " -I$(srcdir)/src"
9
7
  $VPATH << "$(srcdir)/src"
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * hnswlib.rb is a Ruby binding for the Hnswlib.
3
3
  *
4
- * Copyright (c) 2021-2025 Atsushi Tatsuma
4
+ * Copyright (c) 2021-2026 Atsushi Tatsuma
5
5
  *
6
6
  * Licensed under the Apache License, Version 2.0 (the "License");
7
7
  * you may not use this file except in compliance with the License.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * hnswlib.rb is a Ruby binding for the Hnswlib.
3
3
  *
4
- * Copyright (c) 2021-2025 Atsushi Tatsuma
4
+ * Copyright (c) 2021-2026 Atsushi Tatsuma
5
5
  *
6
6
  * Licensed under the Apache License, Version 2.0 (the "License");
7
7
  * you may not use this file except in compliance with the License.
@@ -695,7 +695,6 @@ private:
695
695
  return Qnil;
696
696
  }
697
697
 
698
- hnswlib::SpaceInterface<float>* space;
699
698
  if (strcmp(StringValueCStr(kw_values[0]), "l2") == 0) {
700
699
  rb_iv_set(self, "@space", rb_funcall(rb_const_get(rb_mHnswlib, rb_intern("L2Space")), rb_intern("new"), 1, kw_values[1]));
701
700
  } else {
@@ -92,9 +92,9 @@ class BruteforceSearch : public AlgorithmInterface<dist_t> {
92
92
  return;
93
93
  }
94
94
 
95
+ size_t cur_c = found->second;
95
96
  dict_external_to_internal.erase(found);
96
97
 
97
- size_t cur_c = found->second;
98
98
  labeltype label = *((labeltype*)(data_ + size_per_element_ * (cur_element_count-1) + data_size_));
99
99
  dict_external_to_internal[label] = cur_c;
100
100
  memcpy(data_ + size_per_element_ * cur_c,
@@ -3,7 +3,7 @@
3
3
  # Hnswlib.rb provides Ruby bindings for the Hnswlib.
4
4
  module Hnswlib
5
5
  # The version of Hnswlib.rb you install.
6
- VERSION = '0.9.1'
6
+ VERSION = '0.9.3'
7
7
 
8
8
  # The version of Hnswlib included with gem.
9
9
  HSWLIB_VERSION = '0.8.0'
data/lib/hnswlib.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'hnswlib/version'
4
- # On distributions like Rocky Linux, native extensions are installed in a separate
4
+ # On RHEL-based Linux distributions, native extensions are installed in a separate
5
5
  # directory from Ruby code, so use require to load them.
6
6
  require 'hnswlib/hnswlibext'
7
7
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hnswlib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshoku
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  - !ruby/object:Gem::Version
58
58
  version: '0'
59
59
  requirements: []
60
- rubygems_version: 3.6.9
60
+ rubygems_version: 4.0.3
61
61
  specification_version: 4
62
62
  summary: Ruby bindings for the Hnswlib.
63
63
  test_files: []