iodine 0.7.51 → 0.7.52

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 95f2aaf4cba29fd196558c215f6899964057cfb20520a4bd121e27bf4205520c
4
- data.tar.gz: 2861b7b910a9094ab2500f98964dac4551ac0028845c72522ccfc909570595ef
3
+ metadata.gz: a785781b6a34e3c24c4a1f66e3d6ab25b3bee3cbd7021060182e85a10957e907
4
+ data.tar.gz: 8f3df880cc02eb1e1a139c4a4e4b3c9e37c3240f31bc205ceea69b000a8ca33f
5
5
  SHA512:
6
- metadata.gz: 4cd6f2e365dc5944089bff7ca27f75b5a7912bbf7263895f75c0c6a493f225046fd86543b819646eabd5de0c60fc7f0c66e682ec760919b7faedbe9a30ef479f
7
- data.tar.gz: b50eb0aef891a06d9d649120417010b418cdd31994108b3e09dc0062c5ef623f69c9111fcdd66c063948d317711a6cce348c7ab52e35ba1dee5d43222f30cc6b
6
+ metadata.gz: eedc0f42ce25b27090b61a138d03a8e0a092b9f44a297396e354fea57091b7028de59ad76e9e7818c6ddd44120216a0fa776ed106f86386757f169f16c05289b
7
+ data.tar.gz: f279e9c69f22e7361f300a561dc9310a026d128a319497e4ac170ca63cab875d67d219d688380b9f51894e4b5b298fb125f38cc0fbe82171ff1e3d25a6e4767f
data/CHANGELOG.md CHANGED
@@ -6,7 +6,18 @@ Please notice that this change log contains changes for upcoming releases as wel
6
6
 
7
7
  ## Changes:
8
8
 
9
- #### Change log v.0.7.50
9
+
10
+ #### Change log v.0.7.52 (2022-12-10)
11
+
12
+ **Fix**: Fixes `Iodine.unsubscribe` which failed when a symbol was supplied. Credit to Alexander Pavlenko (@raxoft) for opening issue #134.
13
+
14
+ **Fix**: Fixes `Iodine.is_worker` which gave an incorrect answer due to a copy & paste error. Credit to Alexander Pavlenko (@raxoft) for opening PR #133.
15
+
16
+ #### Change log v.0.7.51 (2022-12-03)
17
+
18
+ **Fix**: Fixes CPU spin error caused by an uncaught integer overflow. Credit to Alexander Pavlenko (@AlexanderPavlenko) for opening issue #132.
19
+
20
+ #### Change log v.0.7.50 (2022-10-29)
10
21
 
11
22
  **Fix**: Fixes some compatibility issues with Rack 3.0. Credit to @taku0 for opening issue #131.
12
23
 
data/ext/iodine/iodine.c CHANGED
@@ -312,7 +312,7 @@ static VALUE iodine_master_is(VALUE self) {
312
312
  * a single process mode (the master is also a worker), `false` otherwise.
313
313
  */
314
314
  static VALUE iodine_worker_is(VALUE self) {
315
- return fio_is_master() ? Qtrue : Qfalse;
315
+ return fio_is_worker() ? Qtrue : Qfalse;
316
316
  }
317
317
 
318
318
  /**
@@ -497,6 +497,7 @@ Ruby Connection Methods - Pub/Sub
497
497
  ***************************************************************************** */
498
498
 
499
499
  typedef struct {
500
+ VALUE channel_org;
500
501
  VALUE channel;
501
502
  VALUE block;
502
503
  fio_match_fn pattern;
@@ -506,7 +507,7 @@ typedef struct {
506
507
  /** Tests the `subscribe` Ruby arguments */
507
508
  static iodine_sub_args_s iodine_subscribe_args(int argc, VALUE *argv) {
508
509
 
509
- iodine_sub_args_s ret = {.channel = Qnil, .block = Qnil};
510
+ iodine_sub_args_s ret = {.channel_org = Qnil, .channel = Qnil, .block = Qnil};
510
511
  VALUE rb_opt = 0;
511
512
 
512
513
  switch (argc) {
@@ -534,7 +535,7 @@ static iodine_sub_args_s iodine_subscribe_args(int argc, VALUE *argv) {
534
535
  rb_raise(rb_eArgError, "method accepts 1 or 2 arguments.");
535
536
  return ret;
536
537
  }
537
-
538
+ ret.channel_org = ret.channel;
538
539
  if (ret.channel == Qnil || ret.channel == Qfalse) {
539
540
  rb_raise(rb_eArgError,
540
541
  "a target (:to) subject / stream / channel is required.");
@@ -652,7 +653,7 @@ static VALUE iodine_pubsub_subscribe(int argc, VALUE *argv, VALUE self) {
652
653
  iodine_sub_add(&sub_global, sub);
653
654
  fio_unlock(&sub_lock);
654
655
  }
655
- return args.channel;
656
+ return args.channel_org;
656
657
  }
657
658
 
658
659
  // clang-format off
@@ -682,6 +683,9 @@ static VALUE iodine_pubsub_unsubscribe(VALUE self, VALUE name) {
682
683
  s_lock = &c->lock;
683
684
  subs = &c->subscriptions;
684
685
  }
686
+ if (TYPE(name) == T_SYMBOL)
687
+ name = rb_sym2str(name);
688
+ Check_Type(name, T_STRING);
685
689
  fio_lock(s_lock);
686
690
  ret = iodine_sub_unsubscribe(subs, IODINE_RSTRINFO(name));
687
691
  fio_unlock(s_lock);
@@ -1,3 +1,3 @@
1
1
  module Iodine
2
- VERSION = '0.7.51'.freeze
2
+ VERSION = '0.7.52'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iodine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.51
4
+ version: 0.7.52
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boaz Segev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-03 00:00:00.000000000 Z
11
+ date: 2022-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -246,7 +246,7 @@ licenses:
246
246
  metadata:
247
247
  allowed_push_host: https://rubygems.org
248
248
  post_install_message: |-
249
- Thank you for installing Iodine 0.7.51.
249
+ Thank you for installing Iodine 0.7.52.
250
250
  Remember: if iodine supports your business, it's only fair to give value back (code contributions / donations).
251
251
  rdoc_options: []
252
252
  require_paths: